Link to home
Start Free TrialLog in
Avatar of mel150
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#/images/headlines/receipt/space.gif' width='80' height='20'></td>
      <td height="20" colspan="2" bgcolor="Blue"><IMG SRC='#request.webroot#/images/headlines/receipt/bill_to.gif' WIDTH='160' HEIGHT='20'></td>
      <td height="20" colspan="2" bgcolor="Blue"><IMG SRC='#request.webroot#/images/headlines/receipt/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!
ASKER CERTIFIED SOLUTION
Avatar of pinaldave
pinaldave
Flag of India image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of mel150
mel150

ASKER

hmmm. I tried that, and the email came through, but in that table, it's not pulling from the database, it just gives the variables:

Name:   #get_order.billing_firstname# #get_order.billing_lastname#   #get_order.shipping_firstname# #get_order.shipping_lastname#
Company:   #get_order.billing_company#   #get_order.shipping_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.webroot#/images/headlines/receipt/light.gif'><span class='paragraphtext'>#get_order.billing_firstname# #get_order.billing_lastname#</td>
            <TD WIDTH='10' BACKGROUND='#request.webroot#/images/headlines/receipt/light.gif'>&nbsp;</TD><TD WIDTH='150' BACKGROUND='#request.webroot#/images/headlines/receipt/light.gif'><span class='paragraphtext'>#get_order.shipping_firstname# #get_order.shipping_lastname#</td>
      </tr>

And so on.

 Do you have any idea why the cfset tag doesn't like that bgcolor? Thanks!
Use cfoutput around that variable.
<cfoutput>#custmailmsg2_html#</cfoutput>
Avatar of mel150

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.webroot#/images/backgrounds/purple.gif'>img src='#request.webroot#/images/headlines/receipt/space.gif' width='80' height='20'></td>