CoderTools Web site

Submitting Forms to a Server


Description


Once the user has entered all the data into the form via the input controls there needs to be some method to send the data in the form to the server. To do this we use something called a submit button.

Examples

Submit Input Tag

Use the submit input tag type to display a button that the user can press to send the form to the location specified in the form action attribute. Typically this would be a location to a server side script that would process the data entered into the form input tags and then send a response back to the user.
    <input 
        type="submit" 
        value="Send to Server" />

Image Input Tag

Use the Image input tag to use an image instead of the standard submit button.

    <form>
        <input type="image" src="../images/arrow-up-over.gif" />
    </form>
    


Attributes for Submit <Input> Tags


Name Values Description
type submit
image
the type attribute specifies the control to use as input.
value text to send to server specifies the value of the element that is sent to the server script that processes the form
name text The name of the control. Used to retrieve the value of the control by the server side script that processes the form
id text Every HTML element can have an id. id is used to identify a tag on the client e.g. using Javascript. We mention it here as many browsers and server side scripting languages allow the use of id in place of the name atttribute

3/27/2017 6:21:59 PM
Terms Of Use | Privacy Statement | Copyright 2006-2015 © Independence Software LLP