3

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.

2 Answers 2

4

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

Sign up to request clarification or add additional context in comments.

1 Comment

This worked for me but this seems a very old bug in .NET that no body cares about, I guess. I wish I could give you +50 points for this.
1

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.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.