Welcome to Redline spacer spacer
Check a Field for an Integer Value
bar Nov 20, 2008
bar Home
bar Downloads
bar Privacy
bar Site Map
bar Search
bar  

 
Home > Toys > Here
 
spacer In this document there is a JavaScript program that you may want to use to help out the new users of your applications.

This JavaScript program is utilized to validate that a numeric field is either numeric and (optionally) is within a specific numeric range. When data is changed in any field so coded, CKint() is called to see if the data is first and foremost a number. If it fails that, a JavaScript 'alert()' box pops up to indicate the error. If the entered data is actually a number, and the call to CKint() specifies a range, the number entered is compared to the range. If the entered number is outside the range, then a JavaScript 'alert()' box pops up to inform the user of this error.

Special Coding Issues

When you look at the source to this document, look over the <input ...> tags for the 'isnumeric' and 'isrange' input fields below. Each has a JavaScript 'onChange=' event handler that is specific to the given input field. The first argument to CKint() is always 'this.value'. If you do not want range checking to occur, simply set the second and third values to '0'. If you do want range checking, the second value is the minimum value, the third is the maximum.


Enter a number
Enter a number between 1 and 100
ICRA Logospacer
spacer
Fight Spam! Join CAUCE!
Motley Fool Money Advisor 05spacer
In Association with Amazon.com

frame bar
spacer Copyright ©
Roland Stolfa, 2008
All Rights Reserved
  [Home]    [Downloads]    [Writings]    [Crafts]    [Living]    [Family]    [Toys]    [Cryptography]    [Fun Links]    [Site Credits]    [Personal Info]    [Privacy]    [Site Map]    [Search]    [Email Me]    [Hosted By: Brinkster.Com]   
subliminal data collector