21.2. Submit Buttons in XHTML MP

In XHTML MP, every form should contain one submit button. The form data is sent to the server when the submit button is pressed. If you are familiar with WML, you should know that data posting is done with anchor links in WML. This is not possible in XHTML MP.

The <input> element is used to create a submit button in XHTML MP. The type attribute should be specified as "submit", like this:


<input type="submit"/>


A submit button's caption is "Submit" by default. The value attribute is used to change a button's caption. The following XHTML MP markup changes the button's caption to "OK".


<input type="submit" value="OK"/>


21.3. Reset Buttons in XHTML MP

When a reset button is pressed, the form that contains the reset button is set to the initial state. A reset button is not a compulsory component of a form in XHTML MP.

Like submit buttons, the <input> element is used to create a reset button. Reset buttons are of the type "reset".


<input type="reset"/>


A reset button's caption is "Reset" by default. Like submit buttons, a reset button's caption can be modified. The value attribute is used to do this. For example, the following XHTML MP markup creates a reset button with the caption "Default".


<input type="reset" value="Default"/>


Previous Page Page 35 of 36 Next Page


Feedback Form (ExpandCollapse)

What do you think about this web page?






(Optional) Please provide us more details. For example, suppose you select option 2 above, can you tell us specifically what information is missing? You can also suggest anything that can help us improve this web page.

(Optional) Your name:

(Optional) Your email address:

Please enter again to confirm:

Due to the amount of messages we received, we may not be able to reply to all messages.

A button for going back to the top of this page