Print Page | Close Window

ASP QUESTION

Printed From: Web Wiz Forums
Category: General Discussion
Forum Name: Classic ASP Discussion
Forum Description: Discussion on Active Server Pages (Classic ASP).
URL: https://forums.webwiz.net/forum_posts.asp?TID=8095
Printed Date: 01 April 2026 at 2:33am
Software Version: Web Wiz Forums 12.08 - https://www.webwizforums.com


Topic: ASP QUESTION
Posted By: webrunner
Subject: ASP QUESTION
Date Posted: 14 December 2003 at 10:57pm

Hi there,

I got a problem on using form submit method. In my code, i defined a "button" type input, and intended to submit the form using submit method, but it always failed. anyone can help me?

my code like this

<form name = "myform" method ="post" action = "actionfile.asp">

<input type = "button" name = "submit" value = "submit" onclick = "javascript: document.myform.submit()"> 

</form>

If I changed the input type to "submit", it worked fine. so I am pretty sure the submit method didn't work properly. How to correct it?

Thanks




Replies:
Posted By: TYSON
Date Posted: 15 December 2003 at 6:23am

<input name="Submit" type="button" onClick="document.myform.submit()" value="Submit">

I dont know why but i tried your code and it wouodnt work, i redid the form and it worked.



-------------
http://www.fuo-motorsports.com/ - http://www.fuo-motorsports.com/


Posted By: aalavar
Date Posted: 15 December 2003 at 6:45am

Change the name to something else, say like mysubmit, instead of submit.  Never name something the same as a reserved word ;)



Posted By: webrunner
Date Posted: 15 December 2003 at 6:18pm

Thank Tyson and aalavar. Problem has been solved




Print Page | Close Window

Forum Software by Web Wiz Forums® version 12.08 - https://www.webwizforums.com
Copyright ©2001-2026 Web Wiz Ltd. - https://www.webwiz.net