[advanced search]
 

Go Back   NamePros.com > Discussion > Web Design & Development > Programming

Programming PHP, Perl, Ruby on Rails, AJAX, HTML, XHTML, CSS, JavaScript, MySQL and any other coding topics.


Closed Thread
 
LinkBack Thread Tools
Old 03-24-2006, 08:59 PM   #1 (permalink)
NamePros Regular
 
Jim_'s Avatar
 
Join Date: Aug 2005
Posts: 585
285.40 NP$ (Donate)

Jim_ is a name known to allJim_ is a name known to allJim_ is a name known to allJim_ is a name known to allJim_ is a name known to allJim_ is a name known to all

Save The Children
I Hate AJAX

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.
__________________
ask me about the internet
Jim_ is offline  
Old 03-24-2006, 09:00 PM   #2 (permalink)
Eating Pie
 
iNod's Avatar
 
Join Date: Nov 2004
Location: Canada
Posts: 2,289
126.05 NP$ (Donate)

iNod has much to be proud ofiNod has much to be proud ofiNod has much to be proud ofiNod has much to be proud ofiNod has much to be proud ofiNod has much to be proud ofiNod has much to be proud ofiNod has much to be proud ofiNod has much to be proud ofiNod has much to be proud of

Special Olympics AIDS/HIV Cystic Fibrosis Save The Children Baby Health Cystic Fibrosis
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
__________________
I feel old.
iNod is offline  
Old 03-24-2006, 09:01 PM   #3 (permalink)
Senior Member
 
angisson's Avatar
 
Join Date: Mar 2006
Location: Michigan
Posts: 1,677
15.02 NP$ (Donate)

angisson has a brilliant futureangisson has a brilliant futureangisson has a brilliant futureangisson has a brilliant futureangisson has a brilliant futureangisson has a brilliant futureangisson has a brilliant futureangisson has a brilliant futureangisson has a brilliant futureangisson has a brilliant futureangisson has a brilliant future

Ethan Allen Fund Save The Children
can't you just use php ? witch is easy ? jw.
__________________
DirectoryPimp.com - One Pimpin' Directory!
angisson is offline  
Old 03-24-2006, 09:01 PM   #4 (permalink)
NamePros Regular
 
Jim_'s Avatar
 
Join Date: Aug 2005
Posts: 585
285.40 NP$ (Donate)

Jim_ is a name known to allJim_ is a name known to allJim_ is a name known to allJim_ is a name known to allJim_ is a name known to allJim_ is a name known to all

Save The Children
Code:
<div id="online">&nbsp;</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>
Quote:
Originally Posted by angisson
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.
__________________
ask me about the internet

Last edited by Jim_; 03-24-2006 at 09:08 PM.
Jim_ is offline  
Old 03-24-2006, 09:22 PM   #5 (permalink)
NamePros Legend
 
weblord's Avatar
 
Join Date: Dec 2005
Location: Philippines - www.Nabaza.com
Posts: 19,840
21,700.43 NP$ (Donate)

weblord Has achieved greatnessweblord Has achieved greatnessweblord Has achieved greatnessweblord Has achieved greatnessweblord Has achieved greatnessweblord Has achieved greatnessweblord Has achieved greatnessweblord Has achieved greatnessweblord Has achieved greatnessweblord Has achieved greatnessweblord Has achieved greatness

Autism Protect Our Planet
kindly check activex if it's blocked or disabled on your msie it might be that one.
weblord is offline  
Old 03-24-2006, 09:24 PM   #6 (permalink)
NamePros Regular
 
Jim_'s Avatar
 
Join Date: Aug 2005
Posts: 585
285.40 NP$ (Donate)

Jim_ is a name known to allJim_ is a name known to allJim_ is a name known to allJim_ is a name known to allJim_ is a name known to allJim_ is a name known to all

Save The Children
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.
__________________
ask me about the internet
Jim_ is offline  
Old 03-24-2006, 09:27 PM   #7 (permalink)
NamePros Legend
 
weblord's Avatar
 
Join Date: Dec 2005
Location: Philippines - www.Nabaza.com
Posts: 19,840
21,700.43 NP$ (Donate)

weblord Has achieved greatnessweblord Has achieved greatnessweblord Has achieved greatnessweblord Has achieved greatnessweblord Has achieved greatnessweblord Has achieved greatnessweblord Has achieved greatnessweblord Has achieved greatnessweblord Has achieved greatnessweblord Has achieved greatnessweblord Has achieved greatness

Autism Protect Our Planet
but since it uses activexobject it need to update on msie.
weblord is offline  
Old 03-25-2006, 11:38 AM   #8 (permalink)
NamePros Regular
 
Jim_'s Avatar
 
Join Date: Aug 2005
Posts: 585
285.40 NP$ (Donate)

Jim_ is a name known to allJim_ is a name known to allJim_ is a name known to allJim_ is a name known to allJim_ is a name known to allJim_ is a name known to all

Save The Children
It was a problem with IE caching the page. All fixed now.
__________________
ask me about the internet
Jim_ is offline  
Closed Thread


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Site Sponsors
Advertise your business at NamePros

All times are GMT -7. The time now is 11:29 PM.


Powered by: vBulletin® Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.3.0
Template-Modifications by TMS
vBCredits v1.4 Copyright ©2007 - 2008, PixelFX Studios

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85