Here first will be information about the background. ASP.NET 2.0 website with AJAX 1.0 extensions.
I have a weird problem that only occurs in Safari, and I can only assume Chrome, since they both use WebKit. I also use jQuery on the site, but currently the jQuery link only loads on one page, so I don't think this is a problem.
I have a friendly message, "Request Processing ...", which appears when you send an asynchronous or asynchronous postback page) and hides after the postback. In the case of async postback, I use the method PageRequestManager add_endRequest(...)to hide the message "Processing request ...". This works fine in FireFox, IE 6/7/8 and Opera, but for some reason Safari (versions for Windows and Mac) add_endRequest(...)does not always work. I'm all about cross browser, so just wondering if anyone has any ideas on how to fix this.
This is a show stopper for me, because not only the message βRequest processing ...β appears, but I also add a transparent div over the whole page to prevent multiple clicks after submitting, so the page becomes unusable if you donβt know how to hack CSS to hide the transparent div.
Here's a snippet of code from my main page markup of what I am doing to process my "Request processing ..." message:
<asp:ScriptManager ID="ScriptManager1" runat="server" />
<script type="text/javascript" src="<%= ResolveClientUrl("~/Script/aspNetAjaxFix.js") %>"></script>
<script type="text/javascript" >
(function() {
var processingID = "<%=processing.ClientID%>"
var prm = Sys.WebForms.PageRequestManager.getInstance();
if (prm)
{
prm.add_endRequest(
function (sender, args) {
if (top['showAsyncProcessingWindow'])
{
setTimeout(function(){document.getElementById(processingID).className="LockOff";document.getElementById('processMe').className='processMeLockOff';if(typeof(showIE6Selects)!="undefined"){showIE6Selects();}}, 1000);
top['showAsyncProcessingWindow'] = false;
}
if(args.get_error() && args.get_error().name === 'Sys.WebForms.PageRequestManagerServerErrorException')
{
args.set_errorHandled(args._error.httpStatusCode == 0);
}
});
}
})();
</script>
And if you are interested in what aspNetAjaxFix.js is, see this question I posted in StackOverFlow, Interrupt and Delay Operation in Internet Explorer
Of course, I was not lucky with him either. This article seemed to be relevant, http://forums.asp.net/t/1247957.aspx , but only asks the same question, has no solution.
.