开发者

IE 8/9 Crashes and Freezes with a message saying "A problem with this webpage caused Internet Explorer to close and reopen the tab?"

开发者 https://www.devze.com 2023-02-04 17:22 出处:网络
I am using Ajax via ICallbackEventHandler in ASP.NET, what happens on the page is that a recursive call is made back to the server every 1000ms using ajax. Here is the code that makes a ajax callback

I am using Ajax via ICallbackEventHandler in ASP.NET, what happens on the page is that a recursive call is made back to the server every 1000ms using ajax. Here is the code that makes a ajax callback every 1 second:

setTimeout("MessageServerRequest(tempLastDate);", 1000);

function MessageServerRequest(param)
{
     WebForm_DoCallback('ChannelControl1','getmessage~' + param,MessageServerResponse,null,null,true);

}

function MessageServerResponse(param, context) 
{

        if (param.length > 0) {
        var splitParam = param.split("~");

        var id = splitParam[0];
        var messagesHtml = splitParam[1];
        var lastDate = splitParam[2];

        tempLastDate = lastDate;

        $('#' + id).prepend(messagesHtml);
    }

    setTimeout("MessageServerRequest(tempL开发者_如何学CastDate);", 1000);
}

What this does is that it gets all the latest messages from the database and returns the new messages back to the client.

Now when i removed the recursive call, IE didnt crash, but the thing is that when i use Mozilla, Safari or Opera everything works fine with the recursive call being used.

I dont understand why its working for all other browsers and not IE 8/9

System Info

Windows 7 ultimate 32 bit visual studio 2006 IE9, even didnt work with IE8 but i upgraded to IE9

Can anyone help me with this issue please, i would be greatful?

Thanks

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号