• Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint
Share this Page URL
Help

Chapter 15. Examples, Examples, Examples! > Example 4—Simple Form Validation

Example 4—Simple Form Validation

If you have a form of any kind on your Web site, you will probably want to reduce the amount of junk or inaccurate information you receive. One of the quickest ways to do this is by having a script that validates the information sent to you.

Here is a simple example that validates one input box that is expecting to receive some text. If it is empty, it refuses to submit the form and tells the user to enter text (see Figure 15.5):


PREVIEW

                                                                          

Not a subscriber?

Start A Free Trial


  
  • Creative Edge
  • Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint