Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Passing callback parameters to setTimeout() does not work in IE?

I used the code in js setTimeout function it is working in firefox ;i,e it is reloaded with in seconds. but not working in IE. I changed the method as 'POST', but not request not supported then it changed again in to 'GET'. Any solution ?

function getCallDetails(cId){
    $.ajax( {
        url : 'callInfo.html?cId='+cId,
        method : "GET",
         dataType: "json",     
        success : function(data) {
        callResult=data.rows;

        showCallDetails(callResult,cId);
        },
        failure : function(form, action) {
        }
    });
    window.setTimeout(getCallDetails, 1000,[cId]);

}
like image 223
ıllıllı lק ıllıllı Avatar asked Feb 13 '26 15:02

ıllıllı lק ıllıllı


1 Answers

You're using a non-IE-compatible version of setTimeout.
In IE, there is no way to pass parameters to the callback.

Also, calling setTimeout there is very wrong; you will get exponentially more concurrent requests because each call generates two more calls.

like image 87
SLaks Avatar answered Feb 15 '26 04:02

SLaks



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!