Changes

Jump to: navigation, search

Building Forms with JavaScript

214 bytes removed, 19:35, 16 May 2007
The JavaScript Button Object
The generic "BUTTON" type can be defined as follows:
 
<pre>
 
 
* '''type="RESET"''' - The reset button. When pressed causes the fields in the Form to be either cleared, or reset to the defaultValue (if one has been specified).
 
A submit button can be created as follows:
<pre>
<input type="TEXT" name="myName" value=""/>
<input type="TEXT" name="myPhone" value=""/>
<input type="BUTTON" name="buttonName" value="Click here to submit informationfor a list of product codes" onClick="validateForm()">
</form>
</pre>
In this case we have configured the button to call a function when it is pressed. This function could, for example, validate the data entered by the user before submitting the formpop up a window containing a description or product code list.

Navigation menu