我有一个在 asp.NET 3.5 中开发的示例应用程序。在我的母版页上,我使用以下代码在加载页面时显示 GIF。它在 IE 和 FF 上正常工作,但在 Chrome 中失败。在按下提交按钮时,服务器获取请求并完成其处理,同时浏览器按预期显示加载 GIF。然而,回发从未完成,用户继续查看进度 GIF。我想知道我在哪里搞砸了......请帮忙!
// Get the instance of PageRequestManager.
var prm = Sys.WebForms.PageRequestManager.getInstance();
// Add initializeRequest and endRequest
prm.add_initializeRequest(prm_InitializeRequest);
prm.add_endRequest(prm_EndRequest);
// Called when async postback begins
function prm_InitializeRequest(sender, args) {
// get the divImage and set it to visible
var panelProg = $get('divImage');
if( panelProg != null)
{
panelProg.style.display = '';
// Disable button that caused a postback
$get(args._postBackElement.id).disabled = true;
}
}
// Called when async postback ends
function …Run Code Online (Sandbox Code Playgroud)