RE: Check for Specific Numeric Date

2009-09-25 Thread Steve LaBadie

Thanks for that Charles. All I am doing is setting up a simple math
question on a form to stop the spam bots. I am not a fan of Captcha and
being a public institution I need to accommodate the masses regarding
accessibility. This is an interim fix until I have time to evaluate my
options.

Steve LaBadie, Web Manager
East Stroudsburg University
200 Prospect St.
East Stroudsburg, Pa 18301
570-422-3999
http://www.esu.edu
slaba...@po-box.esu.edu

-Original Message-
From: Charlie Griefer [mailto:charlie.grie...@gmail.com] 
Sent: Friday, September 25, 2009 4:09 PM
To: cf-talk
Subject: Re: Check for Specific Numeric Date


isNumeric("form.num") will always evaluate to 0 (and not 4).  It's a
literal
string (by virtue of the fact that it's enclosed in quotes).  So this
condition will never be true.

What you want is isNumeric(form.num).  Which will return true or false.
So
when you say isNumeric(form.num) eq 4... I'm not sure that's what you
want.
ColdFusion will accept that... it uses implicit boolean conversion so
true
== 4 is true.  But that's not really what you're going for, I don't
think.

try:




~|
Want to reach the ColdFusion community with something they want? Let them know 
on the House of Fusion mailing lists
Archive: 
http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:326639
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4


Re: Check for Specific Numeric Date

2009-09-25 Thread Charlie Griefer

isNumeric("form.num") will always evaluate to 0 (and not 4).  It's a literal
string (by virtue of the fact that it's enclosed in quotes).  So this
condition will never be true.

What you want is isNumeric(form.num).  Which will return true or false.  So
when you say isNumeric(form.num) eq 4... I'm not sure that's what you want.
ColdFusion will accept that... it uses implicit boolean conversion so true
== 4 is true.  But that's not really what you're going for, I don't think.

try:



On Fri, Sep 25, 2009 at 1:03 PM, Steve LaBadie wrote:

>
> I am trying to checked that a specific number is entered into a form
> field. I am able stop the form from executing, but can't get the form to
> submit with the correct number. Any guidance would be appreciated.
>
>
>
>  IsNumeric("form.num") EQ 4>
>
> 
>
> 
>
> 
>
>
>
> Thanks
>
>
>
> Steve LaBadie, Web Manager
>
> East Stroudsburg University
>
> 200 Prospect St.
>
> East Stroudsburg, Pa 18301
>
> 570-422-3999
>
> http://www.esu.edu 
>
> slaba...@po-box.esu.edu 
>
>
>
> 

~|
Want to reach the ColdFusion community with something they want? Let them know 
on the House of Fusion mailing lists
Archive: 
http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:326638
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4