Re: Extract an URL Variable name?
I did something like this relatively recently, with the added requirement that both the variable name and the value be encrypted (fun, eh). On top of that, there was a handler page that I had to ensure was continuing to attach all of my url vars to the url for cflocation. I'll give you my code snippets here and hopefully you can mine something useful out of them: Handler page looping through variables to attach url scope to cflocation url: Then on a given page where I needed to know if an ID had been passed in > If I'm passing an URL Variable - with the variable name itself being > dynamic, what's the best was to extract the variable name (not the > value) on the receiving page? > > As in: > for: index.cfm?somevar=somevalue > I need to return "somevar" on the receiving page as a value. > > or for: index.cfm?bigdog=bruto > I need to return "bigdog" on the receiving page as a value. > > The receiving page won't know what the variable is in advance... > > Did that make any sense at all? > > > __ Information from ESET NOD32 Antivirus, version of virus > signature database 5263 (20100708) __ > > The message was checked by ESET NOD32 Antivirus. > > http://www.eset.com > ~| Order the Adobe Coldfusion Anthology now! http://www.amazon.com/Adobe-Coldfusion-Anthology-Michael-Dinowitz/dp/1430272155/?tag=houseoffusion Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:335298 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm
RE: Extract an URL Variable name?
structKeyList(url) .:.:.:.:.:.:.:.:.:.:.:.:.:. Bobby Hartsfield http://acoderslife.com -Original Message- From: Won Lee [mailto:won...@gmail.com] Sent: Friday, July 09, 2010 3:04 PM To: cf-talk Subject: Re: Extract an URL Variable name? On Thu, Jul 8, 2010 at 11:11 PM, Les Mizzell wrote: > > If I'm passing an URL Variable - with the variable name itself being > dynamic, what's the best was to extract the variable name (not the > value) on the receiving page? > > As in: > for: index.cfm?somevar=somevalue > I need to return "somevar" on the receiving page as a value. > > or for: index.cfm?bigdog=bruto > I need to return "bigdog" on the receiving page as a value. > > Reference cgi.query_string W ~| Order the Adobe Coldfusion Anthology now! http://www.amazon.com/Adobe-Coldfusion-Anthology-Michael-Dinowitz/dp/1430272155/?tag=houseoffusion Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:335222 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm
Re: Extract an URL Variable name?
On Thu, Jul 8, 2010 at 11:11 PM, Les Mizzell wrote: > > If I'm passing an URL Variable - with the variable name itself being > dynamic, what's the best was to extract the variable name (not the > value) on the receiving page? > > As in: > for: index.cfm?somevar=somevalue > I need to return "somevar" on the receiving page as a value. > > or for: index.cfm?bigdog=bruto > I need to return "bigdog" on the receiving page as a value. > > Reference cgi.query_string W ~| Order the Adobe Coldfusion Anthology now! http://www.amazon.com/Adobe-Coldfusion-Anthology-Michael-Dinowitz/dp/1430272155/?tag=houseoffusion Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:335214 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm
Re: Extract an URL Variable name?
> If I'm passing an URL Variable - with the variable name itself being > dynamic, what's the best was to extract the variable name (not the > value) on the receiving page? > > As in: > for: index.cfm?somevar=somevalue > I need to return "somevar" on the receiving page as a value. > > or for: index.cfm?bigdog=bruto > I need to return "bigdog" on the receiving page as a value. > > The receiving page won't know what the variable is in advance... You can examine all the members of the URL scope, which can be treated like any other structure. Dave Watts, CTO, Fig Leaf Software http://www.figleaf.com/ http://training.figleaf.com/ Fig Leaf Software is a Veteran-Owned Small Business (VOSB) on GSA Schedule, and provides the highest caliber vendor-authorized instruction at our training centers, online, or onsite. ~| Order the Adobe Coldfusion Anthology now! http://www.amazon.com/Adobe-Coldfusion-Anthology-Michael-Dinowitz/dp/1430272155/?tag=houseoffusion Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:335205 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm