我有一個引導模式中的Ajax編輯器。模態打開時第一次運行正常,下一次到工具欄不再存在,它會引發此錯誤。任何想法可能發生什麼?無法獲取未定義或空引用的屬性'contentWindow'
由於
Unhandled exception at line 84, column 9 in http://localhost:53818/ScriptResource.axd?d=QnqJUlWX76vy-voPv0SOyeWuqjSyItje2m_RwWfpN9Dp9KL-kVEuy2eIP-IxAD4LMlqvG3esYD48cWHYJvzAF9a1YRm5XmxfCzWi0PaDVAfNV8mz4aOOLZVDVbMrKXACgpSJB28TI_zeX-HTr-9ysw2&t=ffffffffda74082d
錯誤被拋出的ScriptResource.axd - this._doc = this.get_element()contentWindow.document。
_initIframe: function(value) {
if (!Sys.Extended.UI.HTMLEditor.isIE) {
this._savedValue = value;
this._absAndFixedParents = this._getAbsAndFixedParents();
}
var str = Sys.Extended.UI.HTMLEditor.Trim(this._prepareContent(value));
this._doc = this.get_element().contentWindow.document;
if (!Sys.Extended.UI.HTMLEditor.isIE) {
this._doc.designMode = "on";
}
這是模態
<div id="modalEventsEditor" class="modal">
<div class="modal-dialog">
<div class="modal-content">
<asp:UpdatePanel ID="EventsUpdatePanel" runat="server">
<ContentTemplate>
<div class="modal-header">
<button class="close" aria-hidden="true" type="button" data-dismiss="modal">×</button>
<h4 class="modal-title">Events</h4>
</div>
<div class="modal-body">
<div role="form">
<fieldset>
<div id="eventDateDiv" class="form-group">
<label id="eventDateLabel" for="inputEventDate">Date</label>
<asp:TextBox ID="inputEventDate" CssClass="form-control" placeholder="The Date of the event" runat="server"></asp:TextBox>
<ajaxToolkit:CalendarExtender runat="server" TargetControlID="inputEventDate"></ajaxToolkit:CalendarExtender>
</div>
<div id="eventTimeDiv" class="form-group">
<label id="eventTimeLabel" for="inputEventTime">Time</label>
<input id="inputEventTime" class="form-control" runat="server" type="text" placeholder="The Time of the event" />
</div>
<div id="eventAuthorDiv" class="form-group">
<label id="eventAuthorLabel" for="inputEventAuthor">Author</label>
<input id="inputEventAuthor" runat="server" class="form-control" type="text" placeholder="The Author of this notice" />
</div>
<div id="eventTitleDiv" class="form-group">
<label id="eventTitleLabel" for="inputEventTitle">Title</label>
<input id="inputEventTitle" runat="server" class="form-control" type="text" placeholder="The Title of this notice" />
</div>
</fieldset>
</div>
<div id="editorContainer">
<cc1:Editor ID="Editor1" runat="server" />
</div>
</div>
<div class="modal-footer">
<button class="btn btn-default" type="button" data-dismiss="modal">Close</button>
<button id="modalEventsEditorButton" runat="server" class="btn btn-primary" type="button">Save changes</button>
</div>
</ContentTemplate>
</asp:UpdatePanel>
</div>
</div>
</div>