Tuesday, August 28, 2007

HTML

Introduction to Forms - JavaScript

See section 8J of the book. However, this page contains a more complete overview
of how to write a basic form validation script.

On this page I give the code you need for checking user input in a form.
Using these bits of code, you can write your own scripts to validate forms

I can't give you a complete script, because each form and each check are different.
You'll have to use the elements I explain on this page to build your own script.
I created an example form and script that you can study to
get the hang of it.

On this page I discuss the
limitations of using JavaScript to check a form, then I'll explain the
onsubmit event handler, followed by the few
methods and properties of the form itself.
Then it's time for
accessing the form elements and the specific syntax for accessing
the user defined
value of form elements.

See also Jeff Howden's excellent article
class="external" >Forms & JavaScript Living Together in Harmony
for some of the most common usability errors and their solutions.

For more info : www.shashionline.in

0 comments: