Because the isdefined function doesn't care what the value of the variable
you are passing you don't need to use the evaluate function.  

However if you wanted to output that value you would have to use something
like:

        <cfoutput>#Evaluate("form.serNum#i#")#</cfoutput>

-----Original Message-----
From: j cc [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, November 26, 2002 9:12 AM
To: CF-Talk
Subject: isDefined() finesse


>       <cfif isDefined("Form.SerNum#i#")>

at first I thought it would be isDefined("evaluate(form.serNum#i#)")

BUT

what you had worked fine when i put it in CF 5.

for a test I did this...

<form name="foo" action="test.cfm" method="post">
<input type="hidden" name="serNum1" value="foo">
<input type="submit" value="go">
</form>
<cfset i =1>
<cfif isDefined("form.serNum#i#")>
  foo!
</cfif>

and after submitting the form, I received "foo!" as my output.

-jc

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Archives: http://www.houseoffusion.com/cf_lists/index.cfm?forumid=4
Subscription: 
http://www.houseoffusion.com/cf_lists/index.cfm?method=subscribe&forumid=4
FAQ: http://www.thenetprofits.co.uk/coldfusion/faq
Structure your ColdFusion code with Fusebox. Get the official book at 
http://www.fusionauthority.com/bkinfo.cfm

Reply via email to