Reputation: 16435
I'm using a dropdown with autopostback enabled. When I change the value on the updatepanel it throws and javascript error Microsoft JScript runtime error: Member not found
. I'm using a master page.
Error Location:
Error is occuring at "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>
I'm also using jQuery on the page.
Upvotes: 3
Views: 3379
Reputation: 11
When I used input type="submit" ...>
where the ID was set to "submit" I would normally never give a submit button the ID of "submit", but must have done so in haste. When I gave the submit button an ID of "Search" the problem went away.
Upvotes: 1
Reputation: 740
Found this link which worked for me...
http://www.velocityreviews.com/forums/t110670-__dopostback-fails-on-web-form-submit-net-2-0-a.html
kind of simple solution. Basically, in my case, checked the content page and master page for "name" attribute of "submit", found one with a simple html button, changed the name and voila...worked
HTH
Dave
Upvotes: 4