pm.sreejith
19 Dec 2011, 12:45 AM
Hi All,
I'm trying to detect the network accessibility by using the command given below.
It returns true always even though the network was disabled.
if(window.navigator.onLine === true){
alert('You are in online');
}
else{
alert('You are in offline');
}
Also I would like to confirm that the code given above is related to ST 2.0 or common in Javascript. The problem was found with Chrome. In safari, it is working fine.
Any help would be greatly appreciated.
I'm trying to detect the network accessibility by using the command given below.
It returns true always even though the network was disabled.
if(window.navigator.onLine === true){
alert('You are in online');
}
else{
alert('You are in offline');
}
Also I would like to confirm that the code given above is related to ST 2.0 or common in Javascript. The problem was found with Chrome. In safari, it is working fine.
Any help would be greatly appreciated.