Javascript Make Submit Button Go

RegisterLogin
Javascript Make Submit Button Go
Post Description: This Page Will Explain How You Can Make Html Code To Make A Form Submit With A Button Using Javascript
Tags: Javascript, Make, Submit, Button, Go
This Post Was Posted On Dec 20, 2009 By Webune Tutorials #2930
Welcome to Webune Support Forums - We provide web hosting to people just like you who are just begining to program their websites. We provide excellent support service, that is why we have created this post to show you how you can make a form submit when you hit the submit button but using Javascript instead of the HTML submit button, why do this, because this will help some with robots and perhaps help you in preventing spam on your posting. for example, with the normal submit submit button, i noticed i get a lot of spam messages, but my spam has cut down after implementing javascript.

this is an example of a typical submit button form:

HTML FORM
<form action="" method="post" name="Form1" target="_blank">
<input name="Submit" type="submit" value="Submit" />
</form>


now you can do the same with this form but using javascript, it will submit the form when you click on the button
FORM USING JAVASCRIPT
<form action="" method="post" name="Form1" target="_blank">
<input name="Submit" type="button" value="Submit" onClick="submit();"/>
</form>


try it yourself,

what makes all this work is this:

onClick="submit();"



hope that helps
Leave Your Comments
jk
#4041 1
she's a beautiful monster and i dont mind
Jun 08, 2010 Reply Report abuse
covier
#3241 2
how do you use javascript to hit submit form button ?
Jan 12, 2010 Reply Report abuse
©2011 Webune Forums - Tue Dec 20, 2011 5:41 pm
Powered by: Webune Forums V3