<CFSET newQryString = "">
<CFLOOP INDEX="i" LIST="#cgi.query_string#" DELIMITERS="&">
<CFSET prtName = left(i, find("=", i) - 1)>
<CFSET prtValue = mid(i, find("=", i) + 1, len(i) - find("=", i) + 1)>
<CFIF prtName IS NOT "yourExcludeString">
<CFSET newQryString = ListAppend(newQryString, prtName & "=" &
prtValue,
"&")>
</CFIF>
</CFLOOP>
-----Original Message-----
From: Jon Hall [mailto:[EMAIL PROTECTED]]
Sent: Monday, October 23, 2000 4:43 PM
To: CF-Talk
Subject: testing for the existence of a dynamically created variable
This is a multi-part message in MIME format.
------=_NextPart_000_013B_01C03D21.1065DC60
Content-Type: text/plain;
charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable
I have stumped myself on this one. This should be easy but...
I am looping through the URL Parameters like this:
<cfloop index=3D"u" list=3D"#cgi.QUERY_STRING#" delimiters=3D"&">
<cfset urlvars =3D listappend(urlvars,"#u#")>
</cfloop>
Then I rebuild the url parameters like this:
<cfloop index=3D"urlparams" list=3D"#urlvars#">
<cfset urlparam =3D listappend(urlparam,urlparams,"&")>
</cfloop>
What I need to do is strip out a variable name IF it exists, namely the =
page variable.=20
All I need to really know is how to skip appending it in my 2nd list =
loop above if the word page is in there.
jon
------=_NextPart_000_013B_01C03D21.1065DC60
Content-Type: text/html;
charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META content=3D"text/html; charset=3Diso-8859-1" =
http-equiv=3DContent-Type>
<META content=3D"MSHTML 5.00.3018.900" name=3DGENERATOR>
<STYLE></STYLE>
</HEAD>
<BODY bgColor=3D#ffffff>
<DIV><FONT face=3DArial size=3D2>I have stumped myself on this one. This =
should be=20
easy but...</FONT></DIV>
<DIV> </DIV>
<DIV><FONT face=3DArial size=3D2>I am looping through the URL Parameters =
like=20
this:</FONT></DIV>
<DIV> </DIV>
<DIV><FONT face=3DArial size=3D2><cfloop index=3D"u" =
list=3D"#cgi.QUERY_STRING#"=20
delimiters=3D"&"><BR><cfset urlvars =3D=20
listappend(urlvars,"#u#")><BR></cfloop></FONT></DIV>
<DIV> </DIV>
<DIV><FONT face=3DArial size=3D2>Then I rebuild the url parameters like=20
this:</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT> </DIV>
<DIV><FONT face=3DArial size=3D2><cfloop index=3D"urlparams"=20
list=3D"#urlvars#"><BR></FONT><FONT face=3DArial size=3D2><cfset =
urlparam =3D=20
listappend(urlparam,urlparams,"&")><BR></cfloop></FONT></DIV=
>
<DIV> </DIV>
<DIV><FONT face=3DArial size=3D2>What I need to do is strip out a =
variable name IF=20
it exists, namely the page variable. </FONT></DIV>
<DIV><FONT face=3DArial size=3D2>All I need to really know is how to =
skip appending=20
it in my 2nd list loop above if the word page is in =
there.</FONT></DIV>
<DIV> </DIV>
<DIV> </DIV>
<DIV><FONT face=3DArial size=3D2>jon</FONT></DIV></BODY></HTML>
------=_NextPart_000_013B_01C03D21.1065DC60--
----------------------------------------------------------------------------
--------------------
Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists or send a
message with 'unsubscribe' in the body to [EMAIL PROTECTED]
------------------------------------------------------------------------------------------------
Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists or send a message
with 'unsubscribe' in the body to [EMAIL PROTECTED]