Westside2004
asked on
Mapping Question, getting some error with a <cfset>
Hi,
I am trying to use the following code, but seem to get an error with this line:
<cfset href = /Mapped_Dir/&#GetFileFromP ath(Key)#>
Error: Invalid CFML construct found on line 52 at column 47.
ColdFusion was looking at the following text:
/
I tried to setup a mapping ColdFusion (not sure if I was supposed to or not, but thought I should). The mapping looked like this in CFadmin
Logical Path: /Mapped_Dir
Directory Path: X:\files
The code block is below:
<CFOUTPUT query="GetResults">
<cfset dbfilename = #GetFileFromPath(Key)#>
<cfset href = /Mapped_Dir/&#GetFileFromP ath(Key)#>
<tr>
<td class="intro">
<a class="blah" href="##" onclick="javascript: window.open ('#href#','','toolbar=yes, status=yes ,menubar=y es,scrollb ars=yes,re sizable=ye s,location =yes,width =800,heigh t=600'); return false;">
#dbfilename#
</a>
</TD>
</tr>
</CFOUTPUT>
It seems some of the slashes in the <cfset> tag shown above are creating the problem.
Anyone have any thoughts?
Thanks
-WestSide
I am trying to use the following code, but seem to get an error with this line:
<cfset href = /Mapped_Dir/&#GetFileFromP
Error: Invalid CFML construct found on line 52 at column 47.
ColdFusion was looking at the following text:
/
I tried to setup a mapping ColdFusion (not sure if I was supposed to or not, but thought I should). The mapping looked like this in CFadmin
Logical Path: /Mapped_Dir
Directory Path: X:\files
The code block is below:
<CFOUTPUT query="GetResults">
<cfset dbfilename = #GetFileFromPath(Key)#>
<cfset href = /Mapped_Dir/&#GetFileFromP
<tr>
<td class="intro">
<a class="blah" href="##" onclick="javascript: window.open ('#href#','','toolbar=yes,
#dbfilename#
</a>
</TD>
</tr>
</CFOUTPUT>
It seems some of the slashes in the <cfset> tag shown above are creating the problem.
Anyone have any thoughts?
Thanks
-WestSide
yeah ... also JFYI : u cld also write it as
<cfset href = "/Mapped_Dir/#GetFileFromP ath(Key)#" >
[u dont need to use "&" there]
K'Rgds
Anand
<cfset href = "/Mapped_Dir/#GetFileFromP
[u dont need to use "&" there]
K'Rgds
Anand
Please post here lettig them know you solved your own question :
https://www.experts-exchange.com/Community_Support/
Include a link to this question.
https://www.experts-exchange.com/Community_Support/
Include a link to this question.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Answered my own question...
I need quotes in the <cfset> tag
<cfset href = "/Mapped_Dir/&#GetFileFrom
Thanks... Please delete or close this question out if possible..