Okay this ones bugging the hell out of me... the following code WORKS in I.E. and it even works in my friends Firefox browser... but on my own firefox browser, it runs init once and then refuses to repeat?
I have tried debugging it and have got it down to the point where its adding "xmlhttp.send();" that stops it.
If I remove that line then everything works fine??
Can anyone please give advice?
function init(){
alert ("init");
var xmlhttp;
if (window.XMLHttpRequest)
{// code for IE7+, Firefox, Chrome, Opera, Safari
xmlhttp=new XMLHttpRequest();
}
else
{// code for IE6, IE5
xmlhttp=new ActiveXObject("Microsoft.XMLHTTP");
}
xmlhttp.onreadystatechange=function()
{
if (xmlhttp.readyState==4 && xmlhttp.status==200)
{
var response = xmlhttp.responseText;
if (response == "1"){
loadInterface();
}else{
}
}
}
xmlhttp.open("GET","LiveAssistanceHandle.php?PickedUp=check&refresh=" + (new Date().getTime()),true);
xmlhttp.send();
setTimeout("init()",2000);
}
window.onload = init;
Help















