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  
Smartphone Development  
Style-Sheets  
Web Services  
XML  
Zend  
Zope  
Mobile Linux  
App Generation ROI  
IBM® developerWorks  
Forums Sitemap  
E-Commerce Hosting  
Linux Web Hosting  
Managed Hosting  
Small Business Hosting  
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: starstarstarstarstar / 322
    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:
      error-file:tidyout.log Del.ici.ous error-file:tidyout.log Digg
      error-file:tidyout.log Blink error-file:tidyout.log Simpy
      error-file:tidyout.log Google error-file:tidyout.log Spurl
      error-file:tidyout.log Y! MyWeb error-file:tidyout.log 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


    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

    - Introduction to JavaScript
    - Adding Elements to a Tree with TreeView jQue...
    - Using the Persist Argument in a TreeView jQu...
    - Using Unique and Toggle in a TreeView jQuery...
    - Using Event Delegation for Mouseover Events ...
    - Using the Animate Option in a Treeview jQuer...
    - Using HTML Lists with Event Delegation in Ja...
    - Opened and Closed Branches on a TreeView jQu...
    - Mouseover Events and Event Delegation in Jav...
    - Creating a TreeView JQuery Hierarchical Navi...
    - Event Delegation in JavaScript
    - A Look at the New YUI Carousel Control
    - Working with Draggable Elements and Transpar...
    - Displaying Pinned Handles with Resizable Con...
    - Building Resizable Containers with the Ext J...





    © 2003-2009 by Developer Shed. All rights reserved. DS Cluster 5 Hosted by Hostway
    Stay green...Green IT