I know this works
-----------------------------------
if( str.length == 0 )
                return false;
                
        for( i=0; i<str.length; i++ ){
                if( str.charAt(i) < "0" || str.charAt(i) > "9")
                        return false;
        }
        return true;
-----------------------------------


and I think this will also work
-----------------------------------
if (isNaN(dateObj.valueOf()))
                return false;
-----------------------------------

                                                    
Bryan Love ACP
Internet Application Developer
[EMAIL PROTECTED]
                                                    


-----Original Message-----
From: Jerry Staple [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, July 03, 2001 1:39 AM
To: CF-Talk
Subject: Data Validation


Hi, 
Could someone inform me the best Javascript fucntion to check the value
of a textbox and to make sure the value entered is a number.

Much Apreciated

Jerry Staple
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Structure your ColdFusion code with Fusebox. Get the official book at 
http://www.fusionauthority.com/bkinfo.cfm

Archives: http://www.mail-archive.com/[email protected]/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists

Reply via email to