I am calling this in the code-behind of a page loaded into a Shadowbox popup:
ScriptManager.RegisterStartupScript(this, this.GetType(),
"CloseScript", "parent.closeServiceOption();", true);
I know that the Javascript function is being called, since get the Alert() box pops up, and I can step through the code in the IE Developer Toolbar.
function closeServiceOption() {
Shadowbox.close();
alert("updating");
__doPostBack('<% =upGrid.ClientID %>', '');
return true;
upGrid is an asp:UpdatePanel on the parent page:
<asp:UpdatePanel ID="upGrid" runat="server" UpdateMode="Conditional"
EnableViewState="true">
This trick works on several other pages, but not on the one that I just wrote, and I can't figure out why.
This is the error that IE shows me:
Object doesn't support this property or method ScriptResource.axd?
d=mnUf4WG8LrLFogIwzhvkGVdo-KPzLIFFBfGx6AcICRfPeY_Du0eoxLRaVGrqyoAqxR8l67
1VS6MZAdxdawuxsyoM3wpGxwL83KwO7UehZus1&t=ffffffffec2d9970,
line 4723 character 21
Line 4723 is the finally() clause in the Sys$Net$XMLHttpExecutor function:
finally {
if (_this._xmlHttpRequest != null) {
_this._xmlHttpRequest.onreadystatechange = Function.emptyMethod;
_this._xmlHttpRequest = null;
}
}
2 lines later I get "Permission denied", and "Access is denied" for all other properties of xmlHttpRequest when I inspect them in the debugger. Again, I use this trick (calling __doPostBack on the client) on several other pages where it works. The UpdatePanel has the same attributes (specifically, ViewState is enabled, and disabling it does not fix the issue), and I don't see anything else that is different on this page, but there must be something I am missing. Any ideas?
Firefox/Firebug, btw, does not show any errors at all but the UpdatePanel does not post back, either.