Presentation is loading. Please wait.

Presentation is loading. Please wait.

Validation and Building Small Apps

Similar presentations


Presentation on theme: "Validation and Building Small Apps"— Presentation transcript:

1 Validation and Building Small Apps
JavaScript Forms Validation and Building Small Apps

2 HTML Forms Review HTML Forms are used to select different kinds of user input and pass data to the server. An HTML form can contain input elements like text fields, checkboxes, radio-buttons, submit buttons and more. A form can also contain select lists, textarea, fieldset, legend, and label elements. The <form> tag is used to create an HTML form.

3 HTML Forms Review The <input> element is used to select user information. An <input> element can vary in many ways, depending on the type attribute. Some common <input> types are: text: defines a one-line input field that a user can enter text into. password: defines a password field. radio: let a user select ONLY ONE of a limited number of choices. checkbox: let a user select ZERO or MORE options of a limited number of choices. submit: defines a Submit button. Used to send form data to a server.

4 Form submission When the form is submitted, all the user entered data is sent to the server. Data is sent in as field-value pairs. Visibility of the data depends on the method of submission: get or post

5 action and method attributes
The action attribute holds the URL for the action script that has to be executed when the form is submitted. The action script can be a PHP, a JSP, an ASP, or anything of the sort. The action script can also be another HTML file.

6 get and post methods GET POST All form data is visible in the URL
Form data is not in the URL. Protected during transmission. The size of appended data is restricted. Size of data is potentially unlimited. Very insecure. Used primarily while testing. Quite secure. Preferred by programmers.

7 Form Validation Data validation is the process of ensuring that computer input is clean, correct, and useful. Typical validation tasks are: has the user filled in all required fields? has the user entered a valid date? has the user entered text in a numeric field? Validation can be defined by many different methods, and deployed in many different ways.


Download ppt "Validation and Building Small Apps"

Similar presentations


Ads by Google