I don't know JavaScript but have been tasked to write a script that will change the value of a Boolean variable to the word "Yes" on a table row. I have been trying to achieve this based on my knowledge of ActionScript. Needless to say, I have not been successful!
##CUSTOM_SUB_MA RKETEYE## is a tag that pulls the Boolean result from a database. It returns 1 when it is true and null when it is false. I need to convert that "1" to the word "Yes" and write the word "Yes" to a row in my table.
I realize how much I am asking but would be eternally grateful if someone would help me with this. I appologize, I just don't know where to start. I have been searching the web and begging favors for a day and a half and have gotten absolutely no where. Thanks in advance to anyone who will help! Julie
This is my html document. Where the ##CUSTOM_SUB... ## tags are in my html is where I need to write the converted variable. I do not have to have the tags there.
[HTML]<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<title>Untitl ed Document</title>
</head>
<body
<p> </p>
<div class="mainDiv" align="center">
<img src="http://www.mycmdirect. com/webimages/directweb/7/email_header.jp g" alt="TTI - Never Short on Solutions" title="TTI, Inc. - Never Short on Solutions" height="144" width="669" />
<table style="height: 392px;" align="center" border="0" cellpadding="1" cellspacing="2" width="669">
<tbody><tr>
<td colspan="2" class="promoLin e" height="29" width="706">Feb ruary 28, 2008 </td>
</tr>
<tr>
<td align="left" valign="top"><p > </p>
<p>Thank you, ##FIRSTNAME##,< b> </b>for your interest in TTI's free eNewsletter service. Our records indicate you subscribed to the following electronic newsletters and/or emails:</p>
<table style="height: 148px;" border="0" width="667">
<tbody><tr>
<td width="177"><b> MarketEye</b></td>
<td bordercolor="#F FFFFF" width="480">&nb sp;<b>##CUSTOM_ SUB_MARKETEYE## </b><%= Marketeyeyn%> ;<b> </b><span style="color: navy; font-family: Arial; font-size: x-small;"><span style="font-size: 10pt; color: navy; font-family: Arial;"></span></span></td>
</tr>
<tr>
<td><b><i>IP&am p;E Matters</i></b></td>
<td bordercolor="#F FFFFF"> <b >##CUSTOM_SUB_I PE_MATTERS##</b></td>
</tr>
<tr>
<td><b>Technica l Seminar Series & QuikCasts</b>
<br /></td>
<td bordercolor="#F FFFFF"> <b >##CUSTOM_SUB_T ECHNICAL_SEMINA R_SERIES##</b></td>
</tr>
<tr>
<td><b>TTI Promotional Emails</b></td>
<td bordercolor="#F FFFFF"> <b >##CUSTOM_SUB_P ROMO_EMAIL##</b></td>
</tr>
</tbody></table>
<p><br />
We appreciate you choosing TTI, Inc. as your preferred information source. You should receive your first email within the next 5-7 business days.<br />
<br />
Regards,<br />
<br />
TTI, Inc.</p>
<br />
</td>
</tr>
<tr>
<td colspan="2" class="submitRo w"><div class="style1" align="center"> ©2008 TTI, Inc. 2441 Northeast Pkwy, Fort Worth, TX 76106</div></td>
</tr>
<tr>
<td colspan="2" class="submitRo w"><div class="style1" align="center"> </div><br /></td>
</tr>
</tbody></table>
</div>
</body>
</html>[/HTML]
##CUSTOM_SUB_MA RKETEYE## is a tag that pulls the Boolean result from a database. It returns 1 when it is true and null when it is false. I need to convert that "1" to the word "Yes" and write the word "Yes" to a row in my table.
I realize how much I am asking but would be eternally grateful if someone would help me with this. I appologize, I just don't know where to start. I have been searching the web and begging favors for a day and a half and have gotten absolutely no where. Thanks in advance to anyone who will help! Julie
Code:
<script type="text/javascript"><!--
document.getElementById("##CUSTOM_SUB_MARKETEYE##");
var Marketeye = "##CUSTOM_SUB_MARKETEYE##";
if (Marketeye == true)
{
Marketeye = "Yes";
}
else
{
Marketeye = "No";
}
// --></script>
[HTML]<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<title>Untitl ed Document</title>
</head>
<body
<p> </p>
<div class="mainDiv" align="center">
<img src="http://www.mycmdirect. com/webimages/directweb/7/email_header.jp g" alt="TTI - Never Short on Solutions" title="TTI, Inc. - Never Short on Solutions" height="144" width="669" />
<table style="height: 392px;" align="center" border="0" cellpadding="1" cellspacing="2" width="669">
<tbody><tr>
<td colspan="2" class="promoLin e" height="29" width="706">Feb ruary 28, 2008 </td>
</tr>
<tr>
<td align="left" valign="top"><p > </p>
<p>Thank you, ##FIRSTNAME##,< b> </b>for your interest in TTI's free eNewsletter service. Our records indicate you subscribed to the following electronic newsletters and/or emails:</p>
<table style="height: 148px;" border="0" width="667">
<tbody><tr>
<td width="177"><b> MarketEye</b></td>
<td bordercolor="#F FFFFF" width="480">&nb sp;<b>##CUSTOM_ SUB_MARKETEYE## </b><%= Marketeyeyn%> ;<b> </b><span style="color: navy; font-family: Arial; font-size: x-small;"><span style="font-size: 10pt; color: navy; font-family: Arial;"></span></span></td>
</tr>
<tr>
<td><b><i>IP&am p;E Matters</i></b></td>
<td bordercolor="#F FFFFF"> <b >##CUSTOM_SUB_I PE_MATTERS##</b></td>
</tr>
<tr>
<td><b>Technica l Seminar Series & QuikCasts</b>
<br /></td>
<td bordercolor="#F FFFFF"> <b >##CUSTOM_SUB_T ECHNICAL_SEMINA R_SERIES##</b></td>
</tr>
<tr>
<td><b>TTI Promotional Emails</b></td>
<td bordercolor="#F FFFFF"> <b >##CUSTOM_SUB_P ROMO_EMAIL##</b></td>
</tr>
</tbody></table>
<p><br />
We appreciate you choosing TTI, Inc. as your preferred information source. You should receive your first email within the next 5-7 business days.<br />
<br />
Regards,<br />
<br />
TTI, Inc.</p>
<br />
</td>
</tr>
<tr>
<td colspan="2" class="submitRo w"><div class="style1" align="center"> ©2008 TTI, Inc. 2441 Northeast Pkwy, Fort Worth, TX 76106</div></td>
</tr>
<tr>
<td colspan="2" class="submitRo w"><div class="style1" align="center"> </div><br /></td>
</tr>
</tbody></table>
</div>
</body>
</html>[/HTML]
Comment