Changes

Jump to: navigation, search

An Overview of HTML Forms

17 bytes removed, 19:55, 27 October 2016
m
Text replacement - "<table border="0" cellspacing="0">" to "<table border="0" cellspacing="0" width="100%">"
<googlehtmlet>BUY_PHPphp</googlehtmlet>
== HTML Text Object ==
<googlehtmlet>ADSDAQBOX_FLOWadsdaqbox_flow</googlehtmlet>
The most common form object is the ''Text'' object. The Text object places a single line text field into the form into which the user can type information.
* '''type="BUTTON"''' - The basic button which performs no action by default unless an event handler is assigned to it.
* '''type="SUBMIT"''' - The submit button. When pressed this button causes the data in the Form to be sent to the server using the settings defined in the enclosing <Form> tag. If the ''onsubmit'' attribuite attribute on the enclosing ''<form>'' tag has been specified this will be executed before the form data is submitted (useful for JavaScript form data validation).
* '''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).
[[Image:Javascript select object.jpg]] [[Image:Javascript select object drop down.jpg.jpg]]
If the ''size'' attrtibute attribute is specified and set to a value greater than 1 then a scrolled list, instead of a drop down list, will be displayed with a scrollbar for scrolling through the list of options. For example:
<pre>
Now that we have provided a basic overview of how HTML forms are constructed we can look at how to submit the data to a PHP script on the server and process that data. This is covered in the chapter entitled [[PHP and HTML Forms]].
<googlehtmlet>BUY_PHP_BOTTOMphp</googlehtmlet>

Navigation menu