Reply to topic
using Javascript to detect internet connection
Citizen1200


Joined: 07 Jul 2004
Posts: 54
Location: San Diego
Reply with quote
I don't know much about Javascript, and I'm wondering if it's possible to detect whether or not a user has a connection to the internet using JS? The application is for a CD-ROM, where the links would be do documents contained on the CD if the user has no internet connection, and if the user *does* have a connection, then the links would download current documents from our company website.

thanks for any ideas.
loftboy
Forum Regular

Joined: 24 Jun 2004
Posts: 1129
Location: Colorado
Reply with quote
I dont think you can, too many things potentially ready, willing and able to block a connection anyways, you can always just send out the request and hope for the best.
plu


Joined: 03 May 2005
Posts: 27
Location: Philadelphia
Reply with quote
This can't be acomplished if there is no server side scripting. Since Javascript can only be run on client machine, it can't detect connection if it does not attempt to make connection by sending out request.
Connie


Joined: 26 Mar 2005
Posts: 176
Location: The Internet
Reply with quote
Make a page that ask if they are online? I know, not the best way to do it, but it keeps things simple...
bobum
Elvis Fanatic
Elvis Fanatic

Joined: 16 Nov 2004
Posts: 746
Location: Montgomery, AL
Reply with quote
Does it have to be in JavaSCRIPT?
using Javascript to detect internet connection
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
All times are GMT  
Page 1 of 1  

  
  
 Reply to topic