why not use a NumberValidator?

>I'm having some trouble with a editable combo box with a prompt.
>
>I need to determine if the editable contents are numeric and I can't
>figure out how.  acceptible values include positive integers and
>decimal numerics.  I don't care if they put in "1.00005" I just don't
>want them to put "five" or "$1,000"
>
>I've tried all of the following:
>
>if (Number(cbo.text) is Number)
>if (Number(cbo.text) != NaN)
>if (Number(cbo.text) != 'NaN')
>
>And none of these seem to work.
>
>What do I do here?  I'm sure I could do a regular expression but
>that's got to be overkill.
>
>
>-- 
>Rick Root
>Check out CFMBB, BlogCFM, ImageCFC, ImapCFC, CFFM, and more at
>www.opensourcecf.com 

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Check out the new features and enhancements in the
latest product release - download the "What's New PDF" now
http://download.macromedia.com/pub/labs/coldfusion/cf8_beta_whatsnew_052907.pdf

Archive: http://www.houseoffusion.com/groups/Flex/message.cfm/messageid:4609
Subscription: http://www.houseoffusion.com/groups/Flex/subscribe.cfm
Unsubscribe: 
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.37

Reply via email to