Unstoppable Domains โ€” Expired Auctions

I Hate AJAX

Spaceship Spaceship
Watch

Jim_

Established Member
Impact
33
I'm working on a real-time users online counter.

It works fine in Firefox. It won't update properly in IE.

http://www.j-fx.ws/online/

Any ideas :? I hate this.
 
0
•••
The views expressed on this page by users and staff are their own, not those of NamePros.
AfternicAfternic
Okay.. Post the code first thing.. And IE and firefox have some different Javascript properties which is probley the reason. (Javascript = Backend of AJAX)

- Steve
 
0
•••
can't you just use php ? witch is easy ? jw.
 
0
•••
Code:
<div id="online">ย </div>
<script type="text/javascript" language="javascript">
if (window.XMLHttpRequest) { 
    xmlHttp = new XMLHttpRequest();
} else if (window.ActiveXObject) { 
    xmlHttp = new ActiveXObject("Microsoft.XMLHTTP");
}
function callServer(url) {
  xmlHttp.open("GET", url, true);
  xmlHttp.onreadystatechange = updatePage;
  xmlHttp.send(null);
}
function updatePage() {
  if (xmlHttp.readyState == 4) {
    var response = xmlHttp.responseText;
    document.getElementById("online").innerHTML = response;
    setTimeout('callServer("online.php");',2000);
  }
}
callServer("online.php");
</script>

angisson said:
can't you just use php ? witch is easy ? jw.
Well, then it wouldn't be all cool and in real-time. The back-end is in PHP. Works great.

IE just doesn't seem to like updating the counter.
 
Last edited:
0
•••
kindly check activex if it's blocked or disabled on your msie it might be that one.
 
0
•••
Nope. That's not it. It loads fine once in IE, but it doesn't update. It seems the setTimeout function is being ignored or something. I hate Internet Explorer.
 
0
•••
but since it uses activexobject it need to update on msie. :(
 
0
•••
It was a problem with IE caching the page. All fixed now. :)
 
0
•••
Domain Recover
NameMaxi - Your Domain Has Buyers
  • The sidebar remains visible by scrolling at a speed relative to the pageโ€™s height.
Back