Skip to main content
Known Participant
November 22, 2008
Question

Looking for javascript code to validate decimals

  • November 22, 2008
  • 1 reply
  • 307 views
I have a dollar input field, like 1.99. I need script to edit for blank entries, numeric, and most importantly, 2 place decimal.

I have searched and found numerous scripts on the web but they do not seem to work for me, maybe I am applying it wrong. When I attempt to test, it keeps popping up the error message 'Must be numeric', if I enter 1.99 or 1, or zero. Nohing I enter works.

I have a quantity field, that I validate for blanks, greater than zero, and numeric, and that works. Just can/t find or get the dollar/decimal validation to work.

Thanks for any help or suggestions.
    This topic has been closed for replies.

    1 reply

    November 22, 2008
    Did you check CFINPUT and all the functionality it has?