Problem with ScriptManager.RegisterClientScriptBlock and jQuery in Internet Explorer 8

拈花ヽ惹草 提交于 2019-12-03 06:45:16

This problem occurs because IE8 expects all the DOM elements to be loaded before modifications to the DOM can be made. I was able to duplicate the problem you described with jGrowl.

To fix it, I just modified your script so that the call to jGrowl happens once the document is ready. Here's the updated code:

ScriptManager.RegisterClientScriptBlock(this, typeof(Page), 
     Guid.NewGuid().ToString(),
     "$(function(){$.jGrowl('" + message + "');});", true);

add <form runat="server" id="form1"> to page. It will work...

456qwe123asd

If not wrong, I think you have to add this in the client side page.

<script language="javascript" type="text/javascript" id="forModalPopUp">
    var prm =  Sys.WebForms.PageRequestManager.getInstance();
    prm.add_initializeRequest(InitializeRequest);
    prm.add_endRequest(EndRequest);
    function InitializeRequest(sender, args) {
    }
    function EndRequest(sender, args) {
    }
</script>

For more details, take a look at this.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!