-
Book Overview & Buying
-
Table Of Contents
PHP jQuery Cookbook
By :
Wouldn't it be better if we could validate the data as soon as the user starts typing? We will not have to wait until the button is clicked and this will be quite informative for the user too.
This recipe is a major enhancement on previous recipes and will show you how you can use live validation in your forms. Users will be notified of errors as they are inputting data in a field.
Create a folder named Recipe6 inside the Chapter5 directory.
Create a new file inside Recipe6 folder and name it as index.html. Write the HTML that will create two panels, one for Personal details and the other for Other details. Textboxes of the first panel will have class name required assigned to them. Similarly, the second panel textboxes will have class names required and number assigned to them.
<html>
<head>
<title>Live validation</title>
<style type="text/css">
body{font-family...
Change the font size
Change margin width
Change background colour