Rick,
I immediately thought of the same solution of modifying my original.
However, I think you're thinking of ListRest, and not ListLast. :)
Chris
Rick Law wrote:
So it would just require a slight modification of Chris' code, such as:
<cfset ReferrerQS = ListLast(CGI.HTTP_REFERER, "?")>
<cfloop index="eachParamSet" list="#ReferrerQS#" delimiters="&">
<cfif ListFirst(eachParamSet,"=") IS "numPageID">
<CFSet MyNumPageID = ListLast(eachParamSet,"=")>
</cfif>
</cfloop>
Rick...
From: Joe Kelly <[EMAIL PROTECTED]>
Reply-To: Dallas/Fort Worth ColdFusion User Group Mailing List
<[EMAIL PROTECTED]>
Date: Wed, 13 Sep 2006 17:02:53 -0500
To: Dallas/Fort Worth ColdFusion User Group Mailing List
<[EMAIL PROTECTED]>
Subject: Re: [DFW CFUG] Brain Teaser
Very slick! But.....
CGI.QUERY_STRING gets the query from the current template and not the
Refering template.
Thanks,
Joe Kelly
On 9/13/06, Christopher Jordan <[EMAIL PROTECTED]> wrote:
I'd use CGI.QUERY_STRING.
<cfloop index="i" from="1" to="#ListLen(CGI.QUERY_STRING,"&")#">
<cfset ThisItem = ListGetAt(CGI.QUERY_STRING,i,"&")>
<cfif ListFirst(ThisItem,"=") EQ "numPageID">
<CFSet MyNumPageID = ListLast(ThisItem,"=")>
</cfif>
</cfloop>
How's that?
Chris
Joe Kelly wrote:
I want to see if someone can come up with a more elegant solution to
this problem.
Given:
CGI.HTTP_REFERER will always have a URL variable, "numPageID=xxx"
which is numeric and could be any size number.
The HTTP_REFERER may or may not have other URL variables in any order,
which could be alphanumeric or numeric
The current template needs to pull the value of the "numPageID" URL
variable out of the CGI.HTTP_REFERER
I'll show my solution in another post so as not to spoil anyone's view
on this problem, not saying that mine is best, of course!
Thanks,
Joe Kelly
_______________________________________________
Reply to DFWCFUG: [email protected]
Subscribe/Unsubscribe:
http://lists1.safesecureweb.com/mailman/listinfo/list
List Archives:
http://www.mail-archive.com/list%40list.dfwcfug.org/
http://www.mail-archive.com/list%40dfwcfug.org/
DFWCFUG Sponsors: www.HostMySite.com www.teksystems.com/
_______________________________________________
Reply to DFWCFUG:
[email protected]
Subscribe/Unsubscribe:
http://lists1.safesecureweb.com/mailman/listinfo/list
List Archives:
http://www.mail-archive.com/list%40list.dfwcfug.org/
http://www.mail-archive.com/list%40dfwcfug.org/
DFWCFUG Sponsors:
www.HostMySite.com
www.teksystems.com/
_______________________________________________
Reply to DFWCFUG:
[email protected]
Subscribe/Unsubscribe:
http://lists1.safesecureweb.com/mailman/listinfo/list
List Archives:
http://www.mail-archive.com/list%40list.dfwcfug.org/
http://www.mail-archive.com/list%40dfwcfug.org/
DFWCFUG Sponsors:
www.HostMySite.com
www.teksystems.com/
_______________________________________________
Reply to DFWCFUG:
[email protected]
Subscribe/Unsubscribe:
http://lists1.safesecureweb.com/mailman/listinfo/list
List Archives:
http://www.mail-archive.com/list%40list.dfwcfug.org/
http://www.mail-archive.com/list%40dfwcfug.org/
DFWCFUG Sponsors:
www.HostMySite.com
www.teksystems.com/
|
_______________________________________________
Reply to DFWCFUG:
[email protected]
Subscribe/Unsubscribe:
http://lists1.safesecureweb.com/mailman/listinfo/list
List Archives:
http://www.mail-archive.com/list%40list.dfwcfug.org/
http://www.mail-archive.com/list%40dfwcfug.org/
DFWCFUG Sponsors:
www.HostMySite.com
www.teksystems.com/