473,405 Members | 2,160 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,405 software developers and data experts.

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


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
Jul 23 '05 #1
2 2042
In article <2t*************@uni-berlin.de>, fd***@yahoo.com 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

Jul 23 '05 #2
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.
Jul 23 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

11
by: Adam Parkin | last post by:
Hello all, I need to be able to detect if there is an active available Internet connection in my VB6 program. In my program I'm using the Internet Transfer Control to transfer some files by HTTP,...
25
by: Ryan Stewart | last post by:
I'm working on a project to collect web application usage statistics. What are the recommended ways of detecting whether a browser is JavaScript enabled and/or capable? Obviously I can write a...
4
by: Peter Flynn | last post by:
I'm having trouble finding example code to detect the presence of an Internet connection. It doesn't seem to be a very frequently asked question, as all I need is the answer yes or no (is the user...
3
by: Elizabeth Harmon | last post by:
How can i detect if a user is connected to a newtork or the internet using ..Net? are there any examples out there? Any Help or links Greatly Appreciated TIA Samantha
3
by: leveraged | last post by:
Why can I only connect to or create a web app in VS 2003 using localhost while I am connected to the internet. I have no problems using VS 2002 but for some reason I get Microsoft Development...
2
by: Sam-Kiwi | last post by:
I've spent the last 6 months developing a pay-per-download website using ASP.NET Users purchase documents and then download them. The intention is that users are only charged for documents...
0
by: Woo Mun Foong | last post by:
HI, How do I know whether my PC is already connected to the Internet and not only the LAN ? My program needs to send an email back from my remote PC to my HQ according to schedule. Can I...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.