detecting if a user is connected to the internet...

F

Frances Del Rio

I need to put content from web presentation on CD... interface contains
external links (absolute urls..) is there a way to detect if user is
connected to the internet (so if they're not I can pop an alert saying
'sorry, you're not connected...' etc..) this is for CD's that will be
widely distributed/sold.. so needs to be 'bulletproof'... (that it
doesn't by error detect user is not connected if they are and
vice-versa, etc..)
thank you.. Frances
 
K

kaeli

[email protected] enlightened us said:
I need to put content from web presentation on CD... interface contains
external links (absolute urls..) is there a way to detect if user is
connected to the internet (so if they're not I can pop an alert saying
'sorry, you're not connected...' etc..) this is for CD's that will be
widely distributed/sold.. so needs to be 'bulletproof'... (that it
doesn't by error detect user is not connected if they are and
vice-versa, etc..)



Yes, but not with javascript appropriate to this group.
It would be OS-dependent code. For windows, you could use the windows API to
check that, but that would have to be done in C or VB (J#.net, etc). JScript
in .net is the closest you'll be getting to javascript. ;)

I don't know of any other *reliable* way to check other that that.

--
--
~kaeli~
A midget fortune teller who escapes from prison is a small
medium at large.
http://www.ipwebdesign.net/wildAtHeart
http://www.ipwebdesign.net/kaelisSpace
 
V

VK

You can't, at least on the "bulletproof" level.

IE gives you navigator.onLine property (true/false), but it shows only if
user is in the "global offline mode" (thus, there was an autoconnect attempt
and s/he pressed cancel on it).

Re-think your model. How about a welcome screen (flash/video/audio limited
by your good taste only) with options: "Connect now", "I'm already
connected", "Stay offline".
Set a glob var upon selection and dance from that point forward.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,755
Messages
2,569,537
Members
45,022
Latest member
MaybelleMa

Latest Threads

Top