Solved

Mapping Question, getting some error with a <cfset>

Posted on 2004-08-06
4
183 Views
Last Modified: 2013-12-24
Hi,

I am trying to use the following code, but seem to get an error with this line:

<cfset href = /Mapped_Dir/&#GetFileFromPath(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/&#GetFileFromPath(Key)#>      
            
      <tr>
                      <td class="intro">
<a class="blah" href="##" onclick="javascript: window.open       ('#href#','','toolbar=yes,status=yes,menubar=yes,scrollbars=yes,resizable=yes,location=yes,width=800,height=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
0
Comment
Question by:Westside2004
4 Comments
 
LVL 1

Author Comment

by:Westside2004
ID: 11741592
Hi..

Answered my own question...

I need quotes in the <cfset> tag

<cfset href = "/Mapped_Dir/&#GetFileFromPath(Key)#">

Thanks...  Please delete or close this question out if possible..
0
 
LVL 17

Expert Comment

by:anandkp
ID: 11751092
yeah ... also JFYI : u cld also write it as

<cfset href = "/Mapped_Dir/#GetFileFromPath(Key)#">
[u dont need to use "&" there]

K'Rgds
Anand
0
 
LVL 35

Expert Comment

by:mrichmon
ID: 11753488
Please post here lettig them know you solved your own question :

http://www.experts-exchange.com/Community_Support/

Include a link to this question.
0
 

Accepted Solution

by:
WesLennon earned 0 total points
ID: 11754867
As requested this question will now be placed in PAQ, and 125 points have been refunded.

Thank you,

Wes Lennon
Director of Community Services
Experts Exchange
0

Featured Post

How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

Join & Write a Comment

Most ColdFusion developers get confused between the CFSet, Duplicate, and Structcopy methods of copying a Structure, especially which one to use when. This Article will explain the differences in the approaches with examples; therefore, after readin…
Periodically we have to update or add SSL certificates for customers. Depending upon your hosting plan you may be responsible for the installation and/or key generation. In the wake of Heartbleed many sites were forced to re-key. We will concen…
This video discusses moving either the default database or any database to a new volume.
In this seventh video of the Xpdf series, we discuss and demonstrate the PDFfonts utility, which lists all the fonts used in a PDF file. It does this via a command line interface, making it suitable for use in programs, scripts, batch files — any pl…

708 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

12 Experts available now in Live!

Get 1:1 Help Now