K
Ken
How do I nest a second if(status2) inside the document.write(status1)?
I would like to add the 2nd if(status2) if to the 1st script (status1) so
the picture is removed if status2 = inactive and looks like the 2nd table.
Can this be done?
Ken
<body>
<script type="text/javascript">
var status1 = "active";
var status2 = "inactive";
var Picture = "Logo";
var Name = "Name";
var Note = "This is the info";
var Price = 10.25;
</script>
<script type="text/javascript">
if (status1 == "active") {
document.write('<table cellspacing="0" cellpadding="0" border="1"
width="100%"><tr><td rowspan="3">1' + Picture + '</td><td width="5"
rowspan="3">2 </td><td>3' + Name + '</td></tr><tr><td>4' + Note +
'</td></tr><tr><td>5Price = $' + Price + ' <a
href="1a.htm">Click</a></td></tr></table><br><br>') }
</script>
<script type="text/javascript">
if (status2 == "inactive") {document.write('6No picture')}
</script>
<br><br>
<table cellspacing="0" cellpadding="0" border="1" width="100%"><tr><td
width="5" rowspan="3">2 </td><td align="center" valign="top"
width="125">1Name</td></tr><tr><td>4Note</td></tr><tr><td>5Price = $Price
<a href="1a.htm">Click</a></td></tr></table>
</body>
I would like to add the 2nd if(status2) if to the 1st script (status1) so
the picture is removed if status2 = inactive and looks like the 2nd table.
Can this be done?
Ken
<body>
<script type="text/javascript">
var status1 = "active";
var status2 = "inactive";
var Picture = "Logo";
var Name = "Name";
var Note = "This is the info";
var Price = 10.25;
</script>
<script type="text/javascript">
if (status1 == "active") {
document.write('<table cellspacing="0" cellpadding="0" border="1"
width="100%"><tr><td rowspan="3">1' + Picture + '</td><td width="5"
rowspan="3">2 </td><td>3' + Name + '</td></tr><tr><td>4' + Note +
'</td></tr><tr><td>5Price = $' + Price + ' <a
href="1a.htm">Click</a></td></tr></table><br><br>') }
</script>
<script type="text/javascript">
if (status2 == "inactive") {document.write('6No picture')}
</script>
<br><br>
<table cellspacing="0" cellpadding="0" border="1" width="100%"><tr><td
width="5" rowspan="3">2 </td><td align="center" valign="top"
width="125">1Name</td></tr><tr><td>4Note</td></tr><tr><td>5Price = $Price
<a href="1a.htm">Click</a></td></tr></table>
</body>