JavaScript
  Home arrow JavaScript arrow Page 4 - Form Validation with JavaScript
Dev Shed Forums 
Administration  
AJAX  
Apache  
BrainDump  
DHTML  
Flash  
Java  
JavaScript  
Multimedia  
MySQL  
Oracle  
Perl  
PHP  
Practices  
Python  
Reviews  
Security  
Style-Sheets  
Web Services  
XML  
Zend  
Zope  
Forums Sitemap 
IBM® developerWorks 
Sun Developer Network 
Dedicated Servers 
E-Commerce Hosting 
Linux Web Hosting 
Managed Hosting 
Small Business Hosting 
Actuate Whitepapers 
VeriSign Whitepapers 
VPS Hosting 
Weekly Newsletter

 
Developer Updates  
Free Website Content 
 RSS  Articles
 RSS  Forums
 RSS  All Feeds
Write For Us Get Paid 
Request Media Kit
Contact Us 
Site Map 
Privacy Policy 
Support 
 USERNAME
 
 PASSWORD
 
 
  >>> SIGN UP!  
  Lost Password? 
JAVASCRIPT

Form Validation with JavaScript
By: Nariman K, (c) Melonfire
  • Search For More Articles!
  • Disclaimer
  • Author Terms
  • Rating: 4 stars4 stars4 stars4 stars4 stars / 271
    2003-12-01

    Table of Contents:
  • Form Validation with JavaScript
  • Check Point
  • Object Lessons
  • Rock On
  • Hammer Time
  • How Things Work
  • A Little Space
  • Expressing Yourself
  • Under Construction
  • A Quick Snack

  • Rate this Article: Poor Best 
      ADD THIS ARTICLE TO:
      Del.ici.ous Digg
      Blink Simpy
      Google Spurl
      Y! MyWeb Furl
    Email Me Similar Content When Posted
    Add Developer Shed Article Feed To Your Site
    Email Article To Friend
    Print Version Of Article
    PDF Version Of Article
     
     
    ADVERTISEMENT

    Stay one step ahead of the competition. Evaluate and give feedback on some of the hottest web development tools on the market today. Make your opinion heard! Click Here

    Form Validation with JavaScript - Rock On


    (Page 4 of 10 )

    You've probably already used JavaScript objects before. For example, the code...

    <script language="JavaScript">
    a = new Image();
    </script>
    


    ... creates a new instance of the Image object, while...

    <script language="JavaScript">
    x = new Date();
    </script>
    


    ... creates a new instance of the Date object.

    JavaScript comes with numerous built-in objects, each with pre-defined methods and properties. But what if you want to roll your own?

    Well, it isn't very difficult. As a matter of fact, it's almost identical to writing a JavaScript function.

    <script language="JavaScript">
    // object constructor
    function Band() 
    {
    ...
    }
    </script>
    


    You can create an instance of the Band object like this:

    <script language="JavaScript">
    // object instance
    obj = new Band();
    </script>
    


    Note the all-important "new" keyword - this is how JavaScript knows that you're trying to create an instance of an object, rather than merely running a function.

    The code above creates an instance named "obj" of the object Band. You can verify that it is indeed an object by popping up an alert().

    <script language="JavaScript">
    obj = new Band();
    alert(obj);
    </script>
    


    More JavaScript Articles
    More By Nariman K, (c) Melonfire


     

       

    JAVASCRIPT ARTICLES

    - Getting Attention with Interactive Effects
    - Interacting with Tooltips and Previews
    - Just-in-Time Information and Ajax
    - Interactive Effects
    - Using Cookies With JavaScript
    - Understanding the JavaScript RegExp Object
    - Controlling Browser Properties with JavaScri...
    - Using Timers in JavaScript
    - Form Validation with JavaScript
    - JavaScript Exception Handling
    - Stringing Things Along
    - Understanding The JavaScript Event Model (pa...
    - Understanding The JavaScript Event Model (pa...
    - An Object Lesson In JavaScript

    BlackBerry VTS




    © 2003-2008 by Developer Shed. All rights reserved. DS Cluster 6 hosted by Hostway