Ask a Question related to Coldfusion Database Access, Design and Development.
-
moyerc #1
How do I display a variable in a variable?
I have a email page that allows you to choose from 5 content sections from a
database fields. The data in the database is actual HTML Code put in by a
online WYSIWYG form. So it html.. When the email gets sent it grabs the HTML
from the database field as a varibale called : See example below
<tr>
<td>#htmlbody1# </td>
<td>#htmlbody2# </td>
</tr>
and renders correctly. MY QUESTION IS inside the #htmlbody1# there is HTML
code and I want to append a coldfusion varibale to a hyperlink in the the HTML
that is really #HTMLBODY1#
However when processed the #htmlbody1# is processed butnot the varibale nested
inside the data that #htmlbody1# contains.
I hope this makes sense.
#HTMLBODY1# contains the following code for instance when processed :
<tr><td>Hello world <a href="http://www.mysite.com?email=#e_email#"></td></r>
The e_email doesnt process becuase its embedded inside the #HTMLBODY1#
any help would be great.
moyerc Guest
-
Can Flash display a CF variable value dynamically?
Title pretty much sums it up. Want my flash movie to include text pulled from a CFQUERY. I know there is a "dynamic text" option in the property... -
how to display a javascript variable value
Hi, I have a value in a hidden variable and the other value in a javascript variable. I want to display these two values by using coldfusion. Any... -
Can I display a frame number as variable?
I want to set up a book of sorts and I was wondering how I might go about scripting a variable to display what stop frame the user is on. Can... -
How do I display the name of a variable?
I have a script (below) that can be passed an array and it will dump the contents of the array in to an html table - I use it during development so... -
Display variable with spaces
Hello, I am trying to display the rows of a MySql Query in a table. I retrieve the result using the query : while ($row =... -
paross1 #2
Re: How do I display a variable in a variable?
This is just a SWAG, but perhaps you need to use CFOUTPUT tags, or possibly EVALUATE().
Phil
paross1 Guest
-
MikerRoo #3
Re: How do I display a variable in a variable?
Evaluate() can be tricky and slow.
This approach should work and might be easier to understand. You also might
want to do the string processing before the CFMail tag.
Use:
<td>#ReplaceNoCase (htmlbody1, "##e_email##", e_email, "ALL")# </td>
OR
<CFSET sNewBody = ReplaceNoCase (htmlbody1, "##e_email##", e_email, "ALL")>
The "ALL" is optional if the variable only occurs one time. In that case
omitting it would save a few microseconds.
Cheers,
-- MikeR
MikerRoo Guest
-
moyerc #4
Re: How do I display a variable in a variable?
It worked! Your awesome!
Thank you, so much! I been trying to figure this out forever, just thought it couldn't be done.
Thanks again!
moyerc Guest
-
moyerc #5
Re: How do I display a variable in a variable?
It worked! Your awesome!
Thank you, so much! I been trying to figure this out forever, just thought it couldn't be done.
Thanks again!
moyerc Guest
-
forumnotifier #6
Re: How do I display a variable in a variable?
It worked! Your awesome!
Thank you, so much! I been trying to figure this out forever, just thought it couldn't be done.
Thanks again!:beer;
forumnotifier Guest



Reply With Quote

