Solved

Mapping Question, getting some error with a <cfset>

Posted on 2004-08-06
4
188 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

Free Tool: Subnet Calculator

The subnet calculator helps you design networks by taking an IP address and network mask and returning information such as network, broadcast address, and host range.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
IIS url rewrite rule for web application 3 68
CFFILE upload help 98 205
ip / url redirect 13 74
Web site: http forwards to https causing 301 errors - SEO issue? 26 74
This is a guide to setting up a new WHM/cPanel Server to be used for web hosting accounts. It is intended for web hosting company administrators and dedicated server owners. For under $99 per month (considering normal rate of Big Data Cetnters like …
What You Need to Know when Searching for a Webhost Provider
How to Install VMware Tools in Red Hat Enterprise Linux 6.4 (RHEL 6.4) Step-by-Step Tutorial
Finding and deleting duplicate (picture) files can be a time consuming task. My wife and I, our three kids and their families all share one dilemma: Managing our pictures. Between desktops, laptops, phones, tablets, and cameras; over the last decade…

739 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