[oops, premature send]
Jim,

I suspect that you may misunderstand the IsDefined( ) function.  That 
function checks for the existence of a variable.  Even if a variable 
doesn't contain a value, if it is defined, IsDefined(varname) will return 
true.

It sounds like you might want to check for contents of the variables you 
are testing.  Since they are form variables, I would suggest you use:

<CFIF Len(Trim(form.qty1)) AND Len(Trim(form.uc1))>

That will check if the variable has a value after trimming off any extra 
spaces.

hth,
Kevin

At 02:58 PM 7/15/00 -0700, you wrote:
>The following still allows the CFSET tag to run even though the IsDefined
>variables are empty and hence an error.  This is from a simple mail form
>asking for Quantity (qty1) and price (uc1) and then calculating a total
>price (tc1).  If Quantity and Price are not filled in I want it to go to
>next field.  Please make suggestions on getting this to work.  I have got to
>get it working by Monday morning.
>
><CFIF IsDefined("form.qty1") AND IsDefined("form.uc1")><cfset tc1 =
>#form.qty1# * #form.uc1#></CFIF>
>
><CFOUTPUT>
>#form.tc1#
></CFOUTPUT>
>
>Jim Watkins

--------------------------
Kevin Marshall
Web Application Developer
eCalton.com, Inc.
Vero Beach, FL
www.ecalton.com
[EMAIL PROTECTED]
561.569.4500

------------------------------------------------------------------------------
To Unsubscribe visit 
http://www.houseoffusion.com/index.cfm?sidebar=lists&body=lists/cf_community or send a 
message to [EMAIL PROTECTED] with 'unsubscribe' in the body.

Reply via email to