PDA

View Full Version : navigator.onLine=true - no, the browser =there



Jerome
May 8th, 2003, 05:11 PM
Hi,

Do I understand it well:

navigator.onLine=true , doesn't mean You have a valid internet connection?

The question is then offcourse, how do You check if You really have a valid connection on the moment?

Thanks for Your effort,
Jerome

Jerome
May 8th, 2003, 05:15 PM
First search, then ask! Sorry people I have the answere myself,
Jerome

}
if (!navigator.onLine || self.location.protocol != "http:")
{ // page is viewed locally as a file or offline, from the cache
}

liorean
May 8th, 2003, 05:22 PM
You learn something new every day - I've never seen navigator.onLine before, not in any reference I've had a good look at. How is the support for it in non-ie browsers?

jalarie
May 9th, 2003, 02:09 PM
liorean, it's 'undefined' in NS4.08 whether or not you're online.

Jerome, I use an image to find out:

&nbsp;<img src="http://myplace.com/gren.gif" onload="IsOnline();" onerror="IsOffline();">

brothercake
May 9th, 2003, 02:20 PM
yeah it's IE proprietary. I would avoid using it personally.