This is not the case:
IsDefined is one of those 'funny' tags the proper syntax for checking the
existence of a variable FORM.FirstName is:
IsDefined("FORM.FirstName")
Also #'s are note required inside of most other tags so the following is
syntactically correct:
<cfif FORM.FirstName IS "Sean">
...
</cfif>
Use #'s to interpolate the variable (get at the value not the name). That's
why IsDefined is unusual, you are looking for the presence of a variable
_name_ in the symbol table, if you put #'s in there you'll be looking for
the presence of whatever FORM.FirstName's value is in the symbol table (if
FORM.FirstName is Bob, then IsDefined("#FORM.FieldName#") will look in the
symbol table for a variable named "BOB")
Inside of tags (and outside of quotes) CF interpolates the value for you so
you can do things like:
<cfif flag> <!--- True if flag is "YES" or 1 false if Flag is NO or
zero --->
<cfif Age GTE 21>
But if you have a variable called ColorList and ColorList="red,green,blue"
and you want to loop over that list, you'll need to use the #'s in the
list="" because you want to loop over the value contained in the variable
named colorList:
<cfloop list="#ColorList" index="thisColor">
hth -S
___________________________________________
Sean Brown <[EMAIL PROTECTED]>
http://www.westcar.com/
"Either way you get your dog back"
-Anonymous
___________________________________________
-----Original Message-----
From: Nagesh Kumar Deva [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, May 09, 2000 1:27 PM
To: '[EMAIL PROTECTED]'
Subject: RE: Textarea problem
try this,
in processing form, give #form.req_just# instead form.req_just
otherwise u can also may do this way, <cfif not
isdefined('#form.req_just#')>
nagesh
-----Original Message-----
From: Reuben King [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, May 09, 2000 6:11 AM
To: [EMAIL PROTECTED]
Subject: Re: Textarea problem
In <01A056931BA6D011AE630000F84A801204446FA6@KSCMBS41>, Howell, Katie
([EMAIL PROTECTED]) in a fit of unbridled passion,
wrote:
> I'm having a problem processing a text area. It seem if a user enters
> anything with single quotes, double quotes or the percent sign it causes
> problems. The text area looks like:
> <textarea cols=50 name="req_just" rows=5 wrap=virtual
> class="sgs8n"></textarea>
>
> and on the processing page I have this for validation:
>
> <CFIF FORM.REQ_JUST Is "">
> You must enter the justification.<br>
> <a href="javascript:history.back()">Back</a>
> <CFABORT>
> </cfif>
>
> The user gets the following error:
> Error Occurred While Processing Request
>
> Error resolving parameter FORM.REQ_JUST
[snip]
Make a default value for the form, as: <cfparam name="form.req_just"
default="">
That should fix it for you.
HTH,
-R
----------------------------------------------------------------------------
--
Archives: http://www.eGroups.com/list/cf-talk
To Unsubscribe visit
http://www.houseoffusion.com/index.cfm?sidebar=lists&body=lists/cf_talk or
send a message to [EMAIL PROTECTED] with 'unsubscribe' in
the body.
----------------------------------------------------------------------------
--
Archives: http://www.eGroups.com/list/cf-talk
To Unsubscribe visit
http://www.houseoffusion.com/index.cfm?sidebar=lists&body=lists/cf_talk or
send a message to [EMAIL PROTECTED] with 'unsubscribe' in
the body.
------------------------------------------------------------------------------
Archives: http://www.eGroups.com/list/cf-talk
To Unsubscribe visit
http://www.houseoffusion.com/index.cfm?sidebar=lists&body=lists/cf_talk or send a
message to [EMAIL PROTECTED] with 'unsubscribe' in the body.