![]() |
URL encodedFormat
Hi Peers,
i'am trying to pass a URL "encodedFormat" string to another page. I'am having trouble to pass symbols like # otherwise everything else seem to work. source page Code:
<cfset var1="abc$d"> destination page Code:
<cfoutput> if i put var1="abc12#", this will gimme an error ... problem happens with "#" symbol ... Thoughts |
Quote:
|
hi teedoff,
Thanks, but how if i'am passing a text field value and the user has entered a # sign in the text field ??..how can i double the # sign then.. thanks. |
You shouldn't need to. This is only an issue when you are typing string literals with the '#' symbol into ColdFusion code. Putting in a
<cfset something = "hi##"> will produce the literal string "hi#", which is then set to the variable something. In this case, the double hash symbol (##) in ColdFusion code escapes into a single hash symbol (#).However, whatever someone types into a textfield will not be parsed and processed by ColdFusion. They could type this into a textfield: "oogly #boogly#", and they will get the literal string "oogly #boogly#". However, if you put that in CF code as the value for say, a <cfset> (such as with <cfset something = "oogly #boogly#">), then you would get an error message: "variable 'boogly' is not defined".-Greg |
| All times are GMT +1. The time now is 03:47 AM. |
Powered by vBulletin®
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.