- var xmlhttp;
-
- function ConnectToNet(url)
- {
- xmlhttp=null;
- try {
- netscape.security.PrivilegeManager.enablePrivilege("UniversalBrowserRead");
- } catch (e) {
-
-
-
-
-
- }
-
-
- if (window.XMLHttpRequest) {
- xmlhttp=new XMLHttpRequest()
- }
-
-
- else if (window.ActiveXObject) {
- xmlhttp=new ActiveXObject("Microsoft.XMLHTTP")
- }
- if (xmlhttp!=null) {
-
- xmlhttp._timeout=setTimeout(function() {
- xmlhttp.abort()
- document.getElementById('connection_check_div').style.display = "block";
-
- },
- 30000
- );
- xmlhttp.onreadystatechange=state_Change;
- xmlhttp.open("GET",url,true);
- xmlhttp.send(null);
- } else {
- alert("Your browser does not support XMLHTTP.")
- }
- }
-
- function state_Change()
- {
- if (xmlhttp.readyState==4) {
- try {
- if (xmlhttp.status==200) {
- document.getElementById('connection_check_div').style.display = "none";
- setTimeout("ConnectToNet('setup.cgi')", 2000);
- return;
- } else {
- document.getElementById('connection_check_div').style.display = "none";
-
- setTimeout("ConnectToNet('setup.cgi')", 2000);
- }
- } catch(err) {
- document.getElementById('connection_check_div').style.display = "block";
-
- setTimeout("ConnectToNet('setup.cgi')", 2000);
- }
- } else {
- }
- }
-
- ConnectToNet('setup.cgi');
var xmlhttp;
function ConnectToNet(url)
{
xmlhttp=null;
try {
netscape.security.PrivilegeManager.enablePrivilege("UniversalBrowserRead");
} catch (e) {
//For IE it comes here.
//alert("Permission UniversalBrowserRead denied.");
}
// code for Mozilla, etc.
if (window.XMLHttpRequest) {
xmlhttp=new XMLHttpRequest()
}
// code for IE
else if (window.ActiveXObject) {
xmlhttp=new ActiveXObject("Microsoft.XMLHTTP")
}
if (xmlhttp!=null) {
xmlhttp._timeout=setTimeout(function() {
xmlhttp.abort()
document.getElementById('connection_check_div').style.display = "block";
/* ConnectToNet('setup.cgi');*/
},
30000
); //end setTimeout
xmlhttp.onreadystatechange=state_Change;
xmlhttp.open("GET",url,true);
xmlhttp.send(null);
} else {
alert("Your browser does not support XMLHTTP.")
}
}
function state_Change()
{
if (xmlhttp.readyState==4) {
try {
if (xmlhttp.status==200) {
document.getElementById('connection_check_div').style.display = "none";
setTimeout("ConnectToNet('setup.cgi')", 2000);
return;
} else {
document.getElementById('connection_check_div').style.display = "none";
/* alert("Problem retrieving XML data");*/
setTimeout("ConnectToNet('setup.cgi')", 2000);
}
} catch(err) {
document.getElementById('connection_check_div').style.display = "block";
/* alert('Exception Error! Please Check Your network connection or the state of Wi-Drive');*/
setTimeout("ConnectToNet('setup.cgi')", 2000);
}
} else {
}
}
ConnectToNet('setup.cgi');
Idaig jutottam, mar csak annyi a gond vele, hogy fel/le/fel kapcsolodas utan elofordul az hogy villog az adott div, nopersze azert mert a kapcsolat valamiert ugy tunik fel, mint ha lenne/nem lenne? Ezt hogy lehetne stabilizalni, hogy ujra rakapcsolodaskor fixnek erezze + IE-ben is mukodjek ? Koszi.
■
...
tarold az aktualis allapotot egy valtozoban, vagy js objektumban es figyeld ha valtozik, akkor valtoztasd meg a divnek a lathatosagat.
-cs-
Sanyi