PHP is not called properly in IE using set interval function in Javascript

Posted by Hemant on Stack Overflow See other posts from Stack Overflow or by Hemant
Published on 2010-04-14T12:03:09Z Indexed on 2010/04/25 20:13 UTC
Read the original article Hit count: 311

Filed under:
|
|
|

Hi all,

I am trying to show the message updated in DB using the following code

var showtime = setInterval('redirect()',5000);
////Redirecting to DB Status /////
function redirect()
{   
 xmlhttp = GetXmlHttpObject();
 if (xmlhttp==null)
    {
     alert ("Browser does not support HTTP Request");
     return;
    }
    var url="isResultexist.php"
    xmlhttp.onreadystatechange=stateChanged;
    xmlhttp.open("GET",url,true);
    xmlhttp.send(null);
}

I am collecting the response from PHP here and using it to update the Messages on UI Problem here is it works fine 1st time when it called after 5sec but there after return the Same result even DB is updated,

This works fine with Mozilla and google chrome browser

regards hemant

© Stack Overflow or respective owner

Related posts about php

Related posts about JavaScript