Click to See Complete Forum and Search --> : setInterval Not Working
lougibson
12-23-2002, 03:50 AM
I'm using setInterval to fire some JavaScript code every 5 seconds that uses XML to refresh a message list in a chat application I've developed. All works OK with my browser (IE6) but not when running from an IE5 browser. Any ideas why this might be happening? Many thanks.:confused:
khalidali63
12-23-2002, 09:14 AM
I am not its a typo or thats how you have written it.
setinterval should be setInterval('methodname',timevalue);
'i" in the setInterval must be capital
Hope its guides you.
cheers
Khalid
lougibson
12-23-2002, 09:41 AM
Thanks Dave,
Yes, the XML side of things works fine when fired by the page's onload event. Thereafter nothing happens which leads me to suspect setInterval.
khalidali63
12-23-2002, 10:05 AM
setInterval does work with IE5 browsers,i'd suggetst post your code that is in question.
Khalid
lougibson
12-23-2002, 10:18 AM
Here it is, all JavaScript is at the top. The init() function is fired by the page's onload event.
khalidali63
12-23-2002, 12:24 PM
I have just tested your code with IE5.5
it seems to be working fine...it does call setInterval after the suggested time interval...your problem may lie some where else...:-0
No need to thank me for being such a Grrreat help..
:-)
Khalid
lougibson
12-24-2002, 02:18 AM
Thanks anyway Khalid.