why not just loop over the form and url structs?
<cfset url.a="good">
<cfset url.b="bad">
<cfset url.c="thisoneisgoofy">
<cfset lstBad="">
<cfloop collection="#url#" item="i">
<cfset t=evaluate("url." & i)>
<cfif findnocase("goofy",t)>
<cfset lstBad=listappend(lstBad,i & "^" & t)>
</cfif>
</cfloop>
<cfa_dump var="#lstBad#">
This one puts the url,value tuple in a list. You can do the equivalent with
the form struct
Don
----- Original Message -----
From: "Josh R" <[EMAIL PROTECTED]>
To: "CF-Talk" <[EMAIL PROTECTED]>
Sent: Friday, June 15, 2001 5:38 PM
Subject: How to Cover All URL and Form Attributes?
> Two part question. They are related
>
> Part 1:
>
> Let's say you have a page with lots of URL variables. (I.E. url.search,
> url.lang, url.homepage, url.custscript, url.start, url.end,
url.frontscope,
> etc. etc. etc.)
>
> And you don't want to code a CFIF for each URL seperately for the same
> parameter.
>
> (cfif url.search CONTAINS "goofy")
> do this
> (/cfif)
> (cfif url.lang CONTAINS "goofy")
> do this
> (/cfif)
> (cfif url.hompage CONTAINS "goofy")
> do this
> (/cfif)
> (cfif url.start CONTAINS "goofy")
> do this
> (/cfif)
>
> Is there a way to just say:
>
> (cfif attribute.url CONTAINS "goofy")
> do this
> (/cfif)
>
> Or something similar?
>
>
> Part 2:
>
> Is it possible to also encompass all form.* attributes in one shot?
Similar
> to the question above?
>
> Thanks.
>
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Structure your ColdFusion code with Fusebox. Get the official book at
http://www.fusionauthority.com/bkinfo.cfm
Archives: http://www.mail-archive.com/[email protected]/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists