Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Javascript > detecting if a user is connected to the internet...

Reply
Thread Tools

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

 
 
Frances Del Rio
Guest
Posts: n/a
 
      10-13-2004

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


 
Reply With Quote
 
 
 
 
kaeli
Guest
Posts: n/a
 
      10-13-2004
In article <(E-Mail Removed)>, http://www.velocityreviews.com/forums/(E-Mail Removed) enlightened us
with...
>
> 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

 
Reply With Quote
 
 
 
 
VK
Guest
Posts: n/a
 
      10-13-2004
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.


 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Connection between a lan-connected pc and a wireless connected =?Utf-8?B?Q2lhY2NpaG9tZQ==?= Wireless Networking 1 08-17-2006 11:00 AM
connected but not connected =?Utf-8?B?R2xlbm4=?= Wireless Networking 1 12-04-2005 12:35 AM
Detecting the currently connected user to Tomcat Guy Java 1 09-27-2004 10:12 AM
problem: connected, but not connected to a wireless network Andrew Smith Wireless Networking 0 08-20-2004 07:51 PM
Connected Icon Showing, But In Reality Not Connected. Thoughts On ? Robert11 Computer Support 2 03-02-2004 04:02 PM



Advertisments