问题描述
||
我正在使用启用了自动回发的下拉菜单。当我更改updatepanel上的值时,它将引发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。
解决方法
找到了对我有用的链接...
http://www.velocityreviews.com/forums/dopostback-fails-on-web-form-submit-net-2-0-a.html
一种简单的解决方案。基本上,在我的情况下,检查内容页面和母版页的“提交”的“名称”属性,找到一个带有简单html按钮的名称,更改名称并确认...工作
高温超导
戴夫
, 当我使用ID设置为\“ submit \”的ѭ3never时,我通常不会给提交按钮提供ID“ \ submit \”,但是必须急于这样做。当我给“提交”按钮指定ID为“搜索”时,问题就消失了。