How to write this using C# ASP.net page load event
var script = @"<script type="text/javascript"> //<![CDATA[ var GlvDelayedNextPageNo; function WebForm_CallbackComplete_SyncFixed() { // the var statement ensure the variable is not global for (var i = 0; i < __pendingCallbacks.length; i++) { callbackObject = __pendingCallbacks[i]; if (callbackObject && callbackObject.xmlRequest && (callbackObject.xmlRequest.readyState == 4)) { // SyncFixed: line move below // WebForm_ExecuteCallback(callbackObject); if (!__pendingCallbacks[i].async) { __synchronousCallBackIndex = -1; } __pendingCallbacks[i] = null; var callbackFrameID = "__CALLBACKFRAME" + i; var xmlRequestFrame = document.getElementById(callbackFrameID); if (xmlRequestFrame) { xmlRequestFrame.parentNode.removeChild(xmlRequestFrame); } // SyncFixed: the following statement has been moved down from above; WebForm_ExecuteCallback(callbackObject); } } } var OnloadWithoutSyncFixed = window.onload; window.onload = function Onload() { if (typeof (WebForm_CallbackComplete) == "function") { // Set the fixed version WebForm_CallbackComplete = WebForm_CallbackComplete_SyncFixed; // CallTheOriginal OnLoad if (OnloadWithoutSyncFixed != null) OnloadWithoutSyncFixed(); } } //]]>";
We get it - no one likes a content blocker. Take one extra minute and find out why we block content.
Not exactly the question you had in mind?
Sign up for an EE membership and get your own personalized solution. With an EE membership, you can ask unlimited troubleshooting, research, or opinion questions.
We get it - no one likes a content blocker. Take one extra minute and find out why we block content.
Not exactly the question you had in mind?
Sign up for an EE membership and get your own personalized solution. With an EE membership, you can ask unlimited troubleshooting, research, or opinion questions.