I have this code
function check(){
$.get("friend.php", { id: friendid }, function(data){
//Do stuff with 'data' variable
});
setTimeout(check,5000);
}
It checks friend.php every 5 seconds and returns the result to the data variable.
What I'm trying to do works just fine in other browsers, but in IE8, after the first time it checks friend.php, the contents of the data variable doesn't change. Actually I don't even think IE8 checks again. It does execute all the other code though, as if it had done it. Although it keeps the "data" var exactly the same.
Am I doing something wrong or is it IE's fault? How can I fix this?