Asp Net Theform Submit Error
Contents |
ASP.NET Community Standup Forums Help Home/ASP.NET Forums/General ASP.NET/Web Forms/theform.submit() error theform.submit() error [Answered]RSS 2 replies Last post Oct 16, uncaught typeerror: form.submit is not a function 2003 01:41 PM by d1g1t4lbofh ‹ Previous Thread|Next Thread › javascript:void(0) Print Share Twitter Facebook Email Shortcuts Active Threads Unanswered Threads Unresolved Threads Support Options Advanced Search Related
Dte
Links GuidanceSamplesVideos Reply d1g1t4lbofh None 0 Points 7 Posts theform.submit() error Oct 16, 2003 01:07 PM|d1g1t4lbofh|LINK I have a drop down list in a form that I have set AutoPostBack="true" and OnSelectedIndexChanged="institutionID_SelectedIndexChanged". At the moment all that institutionID_SelectedIndexChanged() does is display some text in a label. When I select a different in the drop down, the drop down fires the client event, the "__doPostBack(eventTarget, eventArgument)" client function fires, but it erros out on the "theform.submit();" call. The error that IE kicks back is: Object doesn't support this property or method. Netscape kicks back: theform.submit is not a function. Any ideas why this is happening? Wayne E. Pfeffer Wayne E. Pfeffer Software Developer Learning Abroad Center University of Minnesota Reply hlaford Member 10 Points 518 Posts Re: theform.submit() error Oct 16, 2003 01:31 PM|hlaford|LINK do you have a button with a name of "submit"? change it to "Submit" or something else. Reply d1g1t4lbofh None 0 Points 7 Posts Re: theform.submit() error Oct 16, 2003 01:41 PM|d1g1t4lbofh|LINK Thank you, that's what was wrong. My submit button was named "submit", I changed it, and now it works. Wayne E. Pfeffer Software Developer Learning Abroad Center University of Minnesota ‹ Previous Thread|Next Thread › This site is managed for Microsoft by Neudesic, LLC. | © 2016 Microsoft. All rights reserved. Privacy Statement| Terms of Use| Contact Us| Advertise With Us| CMS by Umbraco| Hosted on Microsoft Azure Feedback on ASP.NET| File Bugs| Support Lifecycle
here for a quick overview of the site Help Center Detailed answers to any questions you might have Meta Discuss the workings and policies of this site About Us Learn more about Stack Overflow the company Business Learn more about hiring developers or posting ads with us Stack Overflow Questions Jobs Documentation Tags Users Badges Ask Question x Dismiss Join the Stack Overflow Community Stack Overflow is a community of 4.7 million programmers, just like you, helping each other. Join them; it only takes a minute: Sign up ASP.NET and Javascript Error up vote 1 down vote favorite I am upgrading http://forums.asp.net/t/368504.aspx?theform+submit+error a project from ASP.NET 1.1 to ASP.NET 2.0. In my aspx page, I have a hidden field, like this: And I have the following javascript function: function __tabStripPostBack(key) { var theform; if (window.navigator.appName.toLowerCase().indexOf("netscape") > -1) { theform = document.forms["Form1"]; } else { theform = document.Form1; } theform.__TabControlAction.value='Click'; theform.__TabControlKey.value=key; theform.submit(); } In ASP.NET 1.1, this code works fine. However, now that I upgraded to ASP.NET 2.0, I http://stackoverflow.com/questions/836202/asp-net-and-javascript-error get "__TabControlAction is null or not an object" error. For whatever reason, it seems the javascript can't find the hidden field, even though its there. Anyone have any ideas? c# asp.net javascript html vb.net share|improve this question asked May 7 '09 at 18:16 Icemanind 24k28106211 add a comment| 3 Answers 3 active oldest votes up vote 1 down vote accepted I think the name of the form should be "aspnetForm", not "Form1". You should be able to directly refer to it since this bit of javascript is injected on every form with a runat="server" tag. Try changing your code to this: function __tabStripPostBack(key) { theForm.__TabControlAction.value='Click'; theForm.__TabControlKey.value=key; theForm.submit(); } share|improve this answer answered May 7 '09 at 18:20 tvanfosson 350k65567700 add a comment| up vote 0 down vote Is theform still defined? You might need to try this when you declare theform: theform = document.forms['aspnetForm']; In other words, check your generated HTML to see what the name and id attributes of your