Skip to main content
Inspiring
July 12, 2006
Question

URLEncodedFormat() / URLDecode

  • July 12, 2006
  • 2 replies
  • 1980 views
I found the live docs version of these 2 functions, but does anyone know a
place to find a easier explanation on how to use these?

I know to use the URLEncodedFormat() you would use:
<cflocation url="page.cfm?var=#URLEncodedFormat('Form.variabletosend#')">

But I am not sure how to 'decode' it on another page to use it as a variable
on another page.

Thanks
--
Wally Kolcz
Developer / Support


This topic has been closed for replies.

2 replies

Inspiring
July 12, 2006
yeah, I forgot the #. Thanks for the info. Going to try it now!


Participating Frequently
July 12, 2006
If you access the variable, as a normal CF variable:

<cfset newVar=var>
or
<cfset newVar=URL.var>

You do not need to do anything, because CF will perform necessary conversion for you.
Inspiring
July 12, 2006
It's probably just a typo but the closing # needs to be on the other side of the bracket.

You use URLDecode the same way

<cfset myvar = URLDecode(url.var)>

Ken