JavaScript Form Submit Example

The code:

<form name="myform" action="handle-data.php">
Search: <input type='text' name='query'>
<A href="javascript: submitform()">Search</A>
</form>

<SCRIPT language="JavaScript">
function submitform()
{
  document.myform.submit();
}
</SCRIPT>

The form created by the code above:

Search: Submit

For more examples and cases, see:
How To Submit a Form Using JavaScript


Build Web Forms Faaaast!!

Using Simfatic Forms it is very easy to design, create, install and maintain web forms; no coding required!

Simfatic Forms

Quickly create your form, install it and receive form submissions by email.
Click here for more info


  • Digg
  • del.icio.us
  • Netscape
  • Reddit
  • StumbleUpon
  • Technorati
  • YahooMyWeb

Follow me on twitter

HTML Forms
HTML Form Tutorial
The Form Tag
The Form Submit Button
Form design software

Javascript Form Handling
  Basics
Using getElementById to get the elements in a form
Set value of form element using JavaScript
Get value of form element using JavaScript
Handling multiple forms using JavaScript
JavaScript reset/clear a form
  Advanced
JavaScript Form Validation
Submitting a form using JavaScript
Can JavaScript Email a Form?
Switching the form action field dynamically
JavaScript Button

JavaScript Popup Windows
The window.open method
The window.close method
More ...

 
.   Copyright © 2003-2008 Simfatic Solutions. All rights reserved.