View Single Post

Old 08-21-2008, 11:13 AM   #4 (permalink)
chris davies
Junior Member
 
Join Date: Feb 2007
Posts: 10
Rep Power: 0 chris davies is on a distinguished road
Hi there,
Actually, I wasn't using set interval in the wrong place at all. It was all to do with Internet Explorer caching the results, also what I have found since then is that IE prefers to use the POST method while the Mozilla type browsers like to use the GET method.

To cure the caching problem you need to set a timestamped value and concatenate it to the procedure call, something like the following:

Code:
var date = new Date();
var timestamp = date.getTime();
var url = 'yourfilenamehere?' + 'time='+ timestamp;
Remembering to add the '?' for then concatenation

I then had to set up two functions, one each for IE and Mozilla, using:

Code:
xmlHttp.open('post', url, true);
for IE and

Code:
xmlHttp.open('get', url, true)
for Mozilla

Then all you have to do is create and IF clause and test for the browser version, thus selecting the different functions for each browser version.

Hope this helps

Chris
chris davies is offline   Reply With Quote