WebSmart Code Samples
 

Validating for decimal using Javascript

Description: This example validates the text box below to insure there is a decimal point specified. To do this, it uses a javascript function that scans the value and checks for the location of a decimal point. This function is called by the onsubmit event handler in the FORM tag. If the function does not locate a decimal point, it re-focuses on the text box and blocks the submit action. Otherwise, the form is submitted as expected.


Click here to view step by step instructions on how this program was created


Last Value= .00
  This example was created using WebSmart.

www.excelsystems.com