I have an example application developed in asp.NET 3.5. On my main page, I use the following code to display GIFs while the page loads. It works correctly with IE and FF, but does not work in Chrome. When the "Send" button is clicked, the server receives the request and completes its processing, and although this happens, the browser shows the loaded GIF, as expected. However, postback never ends, and the user continues to look at the GIF progress. I wonder where I was going to ... Help, please!
var prm = Sys.WebForms.PageRequestManager.getInstance();
prm.add_initializeRequest(prm_InitializeRequest);
prm.add_endRequest(prm_EndRequest);
function prm_InitializeRequest(sender, args) {
var panelProg = $get('divImage');
if( panelProg != null)
{
panelProg.style.display = '';
$get(args._postBackElement.id).disabled = true;
}
}
function prm_EndRequest(sender, args) {
var panelProg = $get('divImage');
if(panelProg != null)
{
panelProg.style.display = 'none';
$get(sender._postBackSettings.sourceElement.id).disabled = false;
}
}
My divImage is simple
<div id="divImage" style="display: none">
<img id="imgId1" src="../../App_Themes/Images/progressbar.gif" style="border-width:0px;" />
<br />
Please wait...
</div>
source
share