mel150
asked on
can't do bgcolor within cfset tag
Hi,
I have this code (I have deleted some lines I think are uninvolved), and my problem is that if I enter a bgcolor on the td cells, I get an error on the webpage.:
<cfset custmailmsg2_html="
<html>
<body>
<title></TITLE>
<LINK rel=STYLESHEET HREF='../stylesheet.css' TYPE='text/css'>
<TABLE WIDTH='600' BORDER='0' CELLSPACING='0' CELLPADDING='0' ALIGN='CENTER'>
<TR><td width="80" height="20" align="left" bgcolor="Blue"><img src='#request.webroot#/ima ges/headli nes/receip t/space.gi f' width='80' height='20'></td>
<td height="20" colspan="2" bgcolor="Blue"><IMG SRC='#request.webroot#/ima ges/headli nes/receip t/bill_to. gif' WIDTH='160' HEIGHT='20'></td>
<td height="20" colspan="2" bgcolor="Blue"><IMG SRC='#request.webroot#/ima ges/headli nes/receip t/ship_to. gif' WIDTH='160' HEIGHT='20'></td>
</TR>
The error I see is:
attributes.fuseaction: final_receipt message: Invalid CFML construct found on line 293 at column 24.
detail: ColdFusion was looking at the following text:
80
The CFML compiler was processing:
a cfset tag beginning on line 275, column 2.
Any ideas? Seems like the cfset tag doesn't ilke the bgcolor parameter. Thanks!
I have this code (I have deleted some lines I think are uninvolved), and my problem is that if I enter a bgcolor on the td cells, I get an error on the webpage.:
<cfset custmailmsg2_html="
<html>
<body>
<title></TITLE>
<LINK rel=STYLESHEET HREF='../stylesheet.css' TYPE='text/css'>
<TABLE WIDTH='600' BORDER='0' CELLSPACING='0' CELLPADDING='0' ALIGN='CENTER'>
<TR><td width="80" height="20" align="left" bgcolor="Blue"><img src='#request.webroot#/ima
<td height="20" colspan="2" bgcolor="Blue"><IMG SRC='#request.webroot#/ima
<td height="20" colspan="2" bgcolor="Blue"><IMG SRC='#request.webroot#/ima
</TR>
The error I see is:
attributes.fuseaction: final_receipt message: Invalid CFML construct found on line 293 at column 24.
detail: ColdFusion was looking at the following text:
80
The CFML compiler was processing:
a cfset tag beginning on line 275, column 2.
Any ideas? Seems like the cfset tag doesn't ilke the bgcolor parameter. Thanks!
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Use cfoutput around that variable.
<cfoutput>#custmailmsg2_ht ml#</cfout put>
<cfoutput>#custmailmsg2_ht
ASKER
Hi- sorry, I'm pretty new at coldfusion. I'm not sure where that cfoutput tag should go. I'm sure your answer is correct, so I will award you the points with my thanks. What I actually di, though, was this:
<TR><td width="80" height="20" align="left" BACKGROUND='#request.webro ot#/images /backgroun ds/purple. gif'>img src='#request.webroot#/ima ges/headli nes/receip t/space.gi f' width='80' height='20'></td>
<TR><td width="80" height="20" align="left" BACKGROUND='#request.webro
ASKER
Name: #get_order.billing_firstna
Company: #get_order.billing_company
etc.
I should have told you more about what I was trying to do. Beyond the images I listed, I have this code:
<TD CLASS='paragraphtext' WIDTH='150' BACKGROUND='#request.webro
<TD WIDTH='10' BACKGROUND='#request.webro
</tr>
And so on.
Do you have any idea why the cfset tag doesn't like that bgcolor? Thanks!