Using VS2010, and I've tried the 3.5 and 4.0 distributions.
"Microsoft JScript runtime error: Unable to get value of the property 'UI': object is null or undefined"
The toolkit is registered:
<%@ Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit" TagPrefix="asp" %>
I have a ScriptManager referenced (I've also tried with the toolkit scriptmanager)
<asp:ScriptManager ID="ScriptManager1" runat="server">
</asp:ScriptManager>
I have a panel with some sample controls
<asp:panel ID="pnlPopup" runat="server" style="background-color:Blue; display:none">
<asp:TextBox ID="txtPopup" runat="server" />
</asp:panel>
And a ModalPopupExtender
<asp:ModalPopupExtender ID="ModalPopupExtender1" runat="server"
PopupControlID="pnlPopup" TargetControlID="lblAddMessage" >
</asp:ModalPopupExtender>);
});
The page breaks with a jscript error in "Sys.Application.add.init(function() {} on the line
$create(Sys.Extended.UI.ModalPopupBehavior, {"PopupControlID":"ContentPlaceHolder1_pnlPopup","dynamicServicePath":"/WebForms/Search.aspx","id":"ContentPlaceHolder1_ModalPopupExtender1"}, null, null, $get("ContentPlaceHolder1_lblAddMessage"));
I've seen one suggestion to toggle off display:none, and the error is still thrown. Also saw a suggestion to change the tagprefix for the registration, and the error's still thrown.
I'd much rather use this than jQuery (which I'm pretty unfamiliar with). Does anyone have an idea as to what might be happening? Thanks
Comments: Are you using IE 11? If so believe I have discovered a problem with some of Toolkit's auto generated JAVA scripts when using IE 11. All other version of IE seem to work ok. It looks like IE 11 has changed some of it's internal implementation of DOM access. Specifically it appears that document.selection is no longer used in IE11. The changes that were included in IE11 "break" certain functions in the auto generated toolkit java code as it is now written. I ran into this for the Editor Extender. See: [ASP.NET Forums - Editor Extender JAVA script error](http://forums.asp.net/p/1956561/5583494.aspx?Re+Editor+Extender+JAVA+script+error)
"Microsoft JScript runtime error: Unable to get value of the property 'UI': object is null or undefined"
The toolkit is registered:
<%@ Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit" TagPrefix="asp" %>
I have a ScriptManager referenced (I've also tried with the toolkit scriptmanager)
<asp:ScriptManager ID="ScriptManager1" runat="server">
</asp:ScriptManager>
I have a panel with some sample controls
<asp:panel ID="pnlPopup" runat="server" style="background-color:Blue; display:none">
<asp:TextBox ID="txtPopup" runat="server" />
</asp:panel>
And a ModalPopupExtender
<asp:ModalPopupExtender ID="ModalPopupExtender1" runat="server"
PopupControlID="pnlPopup" TargetControlID="lblAddMessage" >
</asp:ModalPopupExtender>);
});
The page breaks with a jscript error in "Sys.Application.add.init(function() {} on the line
$create(Sys.Extended.UI.ModalPopupBehavior, {"PopupControlID":"ContentPlaceHolder1_pnlPopup","dynamicServicePath":"/WebForms/Search.aspx","id":"ContentPlaceHolder1_ModalPopupExtender1"}, null, null, $get("ContentPlaceHolder1_lblAddMessage"));
I've seen one suggestion to toggle off display:none, and the error is still thrown. Also saw a suggestion to change the tagprefix for the registration, and the error's still thrown.
I'd much rather use this than jQuery (which I'm pretty unfamiliar with). Does anyone have an idea as to what might be happening? Thanks
Comments: Are you using IE 11? If so believe I have discovered a problem with some of Toolkit's auto generated JAVA scripts when using IE 11. All other version of IE seem to work ok. It looks like IE 11 has changed some of it's internal implementation of DOM access. Specifically it appears that document.selection is no longer used in IE11. The changes that were included in IE11 "break" certain functions in the auto generated toolkit java code as it is now written. I ran into this for the Editor Extender. See: [ASP.NET Forums - Editor Extender JAVA script error](http://forums.asp.net/p/1956561/5583494.aspx?Re+Editor+Extender+JAVA+script+error)