Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

CFlocation with a varaible

Status
Not open for further replies.

3allawy

Programmer
Oct 19, 2005
28
CA
Hi,

As you can see from the attached code, is there a way to enable cflocation url to be equal to a variable (which is in return a string) not directly only to a string.


<CFSET myVAR1 = "<CFSET myVAR2 = "
<cfif isdefined("FORM.Jmsb")>
<cflocation url= myVAR1 addtoken="no">
</cfif>

<cfif isdefined("FORM.Conc")>
<cflocation url= myVAR1 addtoken="no">
</cfif>
 
If you're attempting to output a variable, you need to have it surrounded with pound signs...
Code:
<CFSET myVAR1 = "[URL unfurl="true"]http://www.google.com/u/concordiau?q=/#FORM.Q#">[/URL]
<cflocation url="#myVAR1#" addtoken="no">
Although I don't know for sure if that will work for cflocation, I've never tried it...


Hope This Helps!

ECAR
ECAR Technologies, LLC

"My work is a game, a very serious game." - M.C. Escher
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top