Solved

Mapping Question, getting some error with a <cfset>

Posted on 2004-08-06
4
189 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
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

Will your db performance match your db growth?

In Percona’s white paper “Performance at Scale: Keeping Your Database on Its Toes,” we take a high-level approach to what you need to think about when planning for database scalability.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

A web service (http://en.wikipedia.org/wiki/Web_service) is a software related technology that facilitates machine-to-machine interaction over a network. This article helps beginners in creating and consuming a web service using the ColdFusion Ma…
Lease-to-own eliminates the expenditure of hardware replacement and allows you to pay off the server over time. Usually, this is much cheaper than leasing servers. Think of lease-to-own as credit without interest.
There's a multitude of different network monitoring solutions out there, and you're probably wondering what makes NetCrunch so special. It's completely agentless, but does let you create an agent, if you desire. It offers powerful scalability …
Add bar graphs to Access queries using Unicode block characters. Graphs appear on every record in the color you want. Give life to numbers. Hopes this gives you ideas on visualizing your data in new ways ~ Create a calculated field in a query: …
Suggested Courses

631 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