> <cfset request.SpiderIsPresent = 0>
> <cfelse>
> <cfset request.SpiderIsPresent = 1>
> </cfif>
Use listfind() and you can shorten that to one line:
<cfset request.SpiderIsPresent = listfind(valuelist(getMTIDs.mtid),
"6")>
listfind() will return the position of the string ("6") in the list if
it exists, or 0 (zero) if it doesn't. Because any non-zero number is
treated as a TRUE value you can assign it directly to your
spiderIsPresent variable.
Tim.
-------------------------------------------------------
<CF_CodingContest mode="judging" newentries="false">
Maze Solver - http://tech.badpen.com/cfcontest/
-------------------------------------------------------
RAWNET LTD - Internet, New Media and ebusiness Gurus.
WE'VE MOVED - for our new address, please visit our
website at http://www.rawnet.com/ or call us any time
on 0800 294 24 24.
-------------------------------------------------------
This message may contain information which is legally
privileged and/or confidential. If you are not the
intended recipient, you are hereby notified that any
unauthorised disclosure, copying, distribution or use
of this information is strictly prohibited. Such
notification notwithstanding, any comments, opinions,
information or conclusions expressed in this message
are those of the originator, not of rawnet limited,
unless otherwise explicitly and independently indicated
by an authorised representative of rawnet limited.
-------------------------------------------------------
> -----Original Message-----
> From: Tony Weeg [mailto:[EMAIL PROTECTED]
> Sent: 09 March 2004 20:40
> To: CF-Talk
> Subject: Re: easy question
>
> would this be it?
>
> <cfif NOT reFind(6,valueList(getMTIDs.mtid),1)>
> <cfset request.SpiderIsPresent = 0>
> <cfelse>
> <cfset request.SpiderIsPresent = 1>
> </cfif>
>
> or some other version of this?
>
>
>
[Todays Threads] [This Message] [Subscription] [Fast Unsubscribe] [User Settings]

