That doesnt work either. I tried <cfhtmlhead text="#variableName#"> and all it did was remove my css div placement. The variables still did not display properly, they display just like they are written in code.
Main Topics
Browse All TopicsI have html and cf code stored in a database. When I call the HTML/CF code into a webpage, it displays all of the coldfusion variables as #variablename# on the actual generated page. I obviously need this to display the variable value. How do I do this?
This Question has been solved and asker verified All Experts Exchange premium technology solutions are available to subscription members.
Experts Exchange has been collecting answers to technology questions since 1996…3 million and counting! If you have a question, chances are we already have your answer.
If you can't find the exact answer you're looking for, ask our exclusive community of 50,000 experts. You’ll get a personalized answer from a trusted professional.
Thousands of free tech tips, tricks, how-to’s and tutorials are available in our peer reviewed articles section. See for yourself how smart our experts are, no login required.
Access the answers to your technology questions today.
30-day free trial. Register in 60 seconds.
Members of the expert community talk about why the experience at Experts Exchange is different than what you will find anywhere else.

Try it out and discover for yourself.
30-day free trial. Register in 60 seconds.
Join the community of experts here and help other tech pros by answering question in your area of expertise. You can earn FREE access to all Experts Exchange's premium features and resources.
database output is designed that way
otherwise you'd get a CF error everytime your db text had a # in it or
let's say the text is a forum like this where someone may post an example
"<cfif StructKeyExists>" which is malformed so another error would arise.
To do what you want to do you need to use "replacement flags"
lets say you have a newletter in your db that you mail out to subscribers.
You would construct the newsletter like so:
==========================
^tDate^<br />
^fName^,<br />
I'm sure you are as happy as a clam to receive this spam.<br />
Your full name is ^Name^.<br /><br />
Your Spam Team
==========================
that would be the text stored in the db
then when you email it you replace the flags like so:
<CFQUERY datasource="#Request.Datas
Select NewsText,NewsSubject,NewsF
From News
Where whatever ...
</CFQUERY>
<cfset TEXTMail=getNews.NewsText>
<CFQUERY datasource="#Request.Datas
SELECT fname,lname, email
FROM Subscribers
where whatever ....
</cfquery>
<CFMAIL FROM="#getNews.NewsFrom#"
TO="#fname# #lname# <#email#>"
SUBJECT="#getNews.NewsSubj
SERVER="#Application.mails
type="html"
query="getSubscribers">
<cfset TEXTMail=replacenocase(TEX
<cfset TEXTMail=replacenocase(TEX
<cfset TEXTMail=replacenocase(TEX
<cfset TEXTMail=replacenocase(TEX
<TABLE>
<TR>
<TD colspan="100%" align="left">
#TEXTMail#
</TD>
</TR>
</TABLE>
</CFMAIL>
And it's as simple as that
you can get more creative also
good luck ...
Business Accounts
Answer for Membership
by: HuyBDPosted on 2007-03-08 at 00:09:04ID: 18677156
try use <cfhtmlhead
<cfhtmlhead text="??????????">
HuyBD;