Am sure am missing something but why doesnt this work??? If I hardcode the string value it works fine... <cfset Str_Order =#rsorder.order_id#> <cfoutput> #Str_Order# </cfoutput> <p><a href="MyAccount.cfm?view=customsinvoice&OrderID=' #Str_Order# ' "> test</a></p>
Do this way: <cfset url.Str_Order =#rsorder.order_id#> <p><cfoutput><a href="MyAccount.cfm?view=customsinvoice&OrderID=' #Str_Order# ' "> test</a></cfoutput></p>
- You don't need the # symbols in your cfset statement - You can use cfparam instead of cfset if you're accepting a URL parameter to ensure the variable is always there and won't break your page - If your order_ID is numeric, you an check that with cfparam or use the val() function - Scoping your variables is always a good idea for speed and clarity - Your code looks like has extra spaces in the ordered you're generating. If your order_ID is non-numeric, you should make sure the string passed is URL encoded: [COLOR=#111111]<cfparam name="url.Str_Order" default="#rsorder.order_id#" />[/COLOR] <p> <cfoutput> [COLOR=#111111]<a href="MyAccount.cfm?view=customsinvoice&OrderID=#urlencodedformat(url.Str_Order)#">test</a>[/COLOR] </cfoutput> </p> Code (markup):