Solved

Using # for non-variables

Posted on 2004-08-04
3
158 Views
Last Modified: 2013-12-24
This is probably an easy quest, but I am a CF n00b and I can't find the answer anywhere. Ok, heres the problem I am querying a database and getting results. Then with the result I want to create a page that does the following

<a href="#12">Title of the Thing</a>

further down the page...
<a name="12"></a>Title of the Thing

Heres my coldfusion code:
<cfoutput query="theQuery"> <a href="##ID#">#title#</a>

further down the page..
<a name="#ID#"></a>#title#</cfoutput>

The problem is with the ##ID#(it doesn't like this), I need a way to seperate the # which is html from the #ID# which is coldfusion variable. Thanks in advance.
0
Comment
Question by:thecode101
  • 2
3 Comments
 
LVL 21

Accepted Solution

by:
pinaldave earned 50 total points
ID: 11716795
Hi thecode101,
use  ###ID# instead of  ##ID# it will work.

Regards,
---Pinal
0
 
LVL 3

Author Comment

by:thecode101
ID: 11716812
Wow thats to easy, thanks.
0
 
LVL 21

Expert Comment

by:pinaldave
ID: 11716826
well, glad to help you my friend.
---Pinal
0

Featured Post

Free Tool: ZipGrep

ZipGrep is a utility that can list and search zip (.war, .ear, .jar, etc) archives for text patterns, without the need to extract the archive's contents.

One of a set of tools we're offering as a way to say 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
question about access to website 2 80
UPLOAD FILE TO Web API USING POST 5 125
Stream live video from Raspberry Pi camera 22 198
Adding multiple JVM environments to RedHat 6 7 49
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…
One of the typical problems I have experienced is when you have to move a web server from one hosting site to another. You normally prepare all on the new host, transfer the site, change DNS and cross your fingers hoping all will be ok on new server…
In an interesting question (https://www.experts-exchange.com/questions/29008360/) here at Experts Exchange, a member asked how to split a single image into multiple images. The primary usage for this is to place many photographs on a flatbed scanner…

820 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