My situation is a pretty simple one. I've got a page with a single UpdatePanel with a Trigger and ContentTemplate as follows:
<atlas:ScriptManager runat="server" ID="scriptMgr" EnablePartialRendering="true" />
....
<atlas:UpdatePanel id="uppnlClearContent" runat="server" Mode="Conditional">
<Triggers>
<atlas:ControlEventTrigger ControlID="btnClearContent" EventName="Click" />
</Triggers>
<ContentTemplate>
<asp:Panel id="pnlClearContent" runat="server"></asp:Panel>
<p><asp:CheckBox id="chkClearContent" runat="server" Text="Clear Content." Checked="false" /></p>
<p><asp:Button id="btnClearContent" runat="server" Text="Clear It!" CausesValidation="false" OnClick="btnClearContent_Click"/></p>
</ContentTemplate>
</atlas:UpdatePanel>
I have some processing (very basic logic) happening on the backend and then messages are returned and displayed via the Panel control... and all works well in IE. Actually, it works great in FF for the first click (request), but any subsequent clicks never trigger the AJAX call b/c a javaScript exception is being thrown in (I assume) the callback handler from the first click. I need to refresh/reload the page in order to kick off another request... kind of defeats the purpose of AJAX, huh?
Using the FireFox javaScript Console, I see the following exception being thrown after clicking the btnClearContent button:
Error: [Exception... "Access to restricted URI denied" code: "1012" nsresult: "0x805303f4 (NS_ERROR_DOM_BAD_URI)"
and the offending line of code is the for loop below:
this._updateStyleSheet = function(cssText) {
var head = document.getElementsByTagName('HEAD')[0];
var styles = document.styleSheets;
var styleSheet = styles[styles.length - 1];
if (Sys.Runtime.get_hostType() == Sys.HostType.InternetExplorer) {
styleSheet.cssText = cssText;
}
else {
for (var i = styleSheet.cssRules.length - 1; i >= 0; i--) {
styleSheet.deleteRule(i);
}
My Venkman debugger is acting odd so I can't dig into this anymore. Is anyone else seeing this?