【发布时间】:2011-06-09 23:46:41
【问题描述】:
我正在使用启用了自动回发的下拉菜单。当我更改更新面板上的值时,它会抛出 javascript 错误Microsoft JScript runtime error: Member not found。我正在使用母版页。
错误位置:
“theForm.submit();”发生错误
<script type="text/javascript">
//<![CDATA[
var theForm = document.forms['ctl01'];
if (!theForm) {
theForm = document.ctl01;
}
function __doPostBack(eventTarget, eventArgument) {
if (!theForm.onsubmit || (theForm.onsubmit() != false)) {
theForm.__EVENTTARGET.value = eventTarget;
theForm.__EVENTARGUMENT.value = eventArgument;
theForm.submit();
}
}
//]]>
</script>
Asp.Net/HTML:
<asp:ScriptManager ID="manager" runat="server" ></asp:ScriptManager>
<asp:UpdatePanel ID="platformOutputTypes" runat="server" UpdateMode="Always" >
<ContentTemplate >
<p>
<label>Platform</label>
<asp:DropDownList ID="platform" AutoPostBack="true" runat="server" onselectedindexchanged="PlatformSelectedIndexChanged" ></asp:DropDownList>
</p>
<asp:CheckBoxList TextAlign="Left" ID="reportOutputTypes" runat="server" />
</ContentTemplate>
</asp:UpdatePanel>
我也在页面上使用 jQuery。
【问题讨论】:
标签: c# asp.net asp.net-ajax updatepanel