No it wouldn't

<cfoutput>
#VAL("somevalue")#
</cfoutput>

Returns 0 so if it was not a numeric value you would want it to be 0 anyway,
just like #VAL("")#  returns 0

Steve

-----Original Message-----
From: [email protected] [mailto:[EMAIL PROTECTED] On Behalf
Of Dale Fraser
Sent: Friday, 6 July 2007 11:00 PM
To: [email protected]
Subject: [cfaussie] Re: Text box.


PS: Steve's method would work as well, but would error if they enter non
numeric value.

But you may already have some checks around that.

Regards
Dale Fraser

http://dalefraser.blogspot.com


-----Original Message-----
From: [email protected] [mailto:[EMAIL PROTECTED] On Behalf
Of Dale Fraser
Sent: Friday, 6 July 2007 10:48 PM
To: [email protected]
Subject: [cfaussie] Re: Text box.


It should be simple

On the submit page

<cfif form.QTY eq ''>
        <cfset form.QTY = 0 />
</cfif>

Regards
Dale Fraser

http://dalefraser.blogspot.com

-----Original Message-----
From: [email protected] [mailto:[EMAIL PROTECTED] On Behalf
Of TJS
Sent: Friday, 6 July 2007 5:21 PM
To: cfaussie
Subject: [cfaussie] Text box.


Hi Everyone,

I am new to CFAussie.  I greatly appreciate anyone's response(s) to my
question below.

I have a results page that lists a series of products.  Beside each product
description, there is a CF text box that allows a user to specify a quantity
value a person wants to order.

At the moment, I have the following code:-

<cfinput type="Text" name="QTY" value="0" size="3">

When the user SUBMITS the form, a hidden SKU value, and the corresponding
QTY value is fed into an arrayList on the results page.

What I would like to do is rather than show a value "0" in each text box, I
would like to show a blank text box value.

And when the user SUBMITS the form, if a value is not specified, "0"
is automatically assumed and sent.

The problem I have at the moment, is that without specifying 0 or a numeric
value, the values being fed into an array on the receiving page generate an
error saying an element cannot be found.

I hope this makes sense.

Thanks again to anyone that is able to answer what to do here.

Cheers,

Travis.











--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"cfaussie" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cfaussie?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to