Question
Passing a query string through the URL?
Trying to pass a custom query string to a template through
the URL, example (assume all inside cfoutput tags):
<cfset qrystr="name=Jane&eyes=brown&hair=blond&number=2125551234">
Here is the qrystr encoded: #URLEncodedFormat(qrystr)#<br>
<a href=" http://www.hfdkldf.com/main.cfm?action=saveinfo&qrystr=#URLEncodedFormat(qrystr)#">save her info</a>
Testing this out, I'm seeing that the second line's output indeed shows qrystr with "=" and "&" replaced by "%3D" and "%26", respectively. However, when I mouseover the link on line 3 and look at the URL in the status bar, I see the link's url does not have qrystr encoded. So, the receiving template is going to see qrystr only as "name=Jane", and not the full string. How can I pass qrystr in the URL so that it remains encoded and will be received with it's complete value?
I could use the replace function to custom encode qrystr myself, and then decode it at the receiving template, but I thought the whole point of a function like URLEncodedFormat was to avoid having to do that.
<cfset qrystr="name=Jane&eyes=brown&hair=blond&number=2125551234">
Here is the qrystr encoded: #URLEncodedFormat(qrystr)#<br>
<a href=" http://www.hfdkldf.com/main.cfm?action=saveinfo&qrystr=#URLEncodedFormat(qrystr)#">save her info</a>
Testing this out, I'm seeing that the second line's output indeed shows qrystr with "=" and "&" replaced by "%3D" and "%26", respectively. However, when I mouseover the link on line 3 and look at the URL in the status bar, I see the link's url does not have qrystr encoded. So, the receiving template is going to see qrystr only as "name=Jane", and not the full string. How can I pass qrystr in the URL so that it remains encoded and will be received with it's complete value?
I could use the replace function to custom encode qrystr myself, and then decode it at the receiving template, but I thought the whole point of a function like URLEncodedFormat was to avoid having to do that.