AlexMC
12-10-2002, 10:25 PM
Why doesn't this work on Mozilla ???
<html>
<head>
<script langauge="javascript">
<!--
function show(rowID) {
if (eval('tr'+rowID+'.className')=="hide") {
eval('tr'+rowID+'.className="show"')
eval('img'+rowID+'.src="images/minus.gif"');
}
else {
eval('tr'+rowID+'.className="hide"')
eval('img'+rowID+'.src="images/plus.gif"');
}
}
//-->
</script>
<style>
<!--
.hide { visibility: hidden; display: none }
.show { visibility: visible; display: block }
//-->
</style>
</head>
<body>
<table border=1 cellspacing=1 cellpadding=5>
<tr>
<td><a style="cursor:hand" onclick="show('1')"><img name="img1" border="0" src="images/plus.gif" width="10" height="10"> Topic 1</a></td></tr>
<tr id="tr1" class="hide">
<td>Information for Topic 1 here</td>
</tr>
<tr>
<td><a style="cursor:hand" onclick="show('2')"><img name="img2" border="0" src="images/plus.gif" width="10" height="10"> Topic 2</a></td></tr>
<tr id="tr2" class="hide">
<td>Information for Topic 2 here</td>
</tr>
<tr>
<td><a style="cursor:hand" onclick="show('3')"><img name="img3" border="0" src="images/plus.gif" width="10" height="10"> Topic 3</a></td></tr>
<tr id="tr3" class="hide">
<td>Information for Topic 3 here</td>
</tr>
</table>
</body>
</html>
Is it possible to make it work? How?
I'm starting to hate mozilla
Thanks in advance for your time.
<html>
<head>
<script langauge="javascript">
<!--
function show(rowID) {
if (eval('tr'+rowID+'.className')=="hide") {
eval('tr'+rowID+'.className="show"')
eval('img'+rowID+'.src="images/minus.gif"');
}
else {
eval('tr'+rowID+'.className="hide"')
eval('img'+rowID+'.src="images/plus.gif"');
}
}
//-->
</script>
<style>
<!--
.hide { visibility: hidden; display: none }
.show { visibility: visible; display: block }
//-->
</style>
</head>
<body>
<table border=1 cellspacing=1 cellpadding=5>
<tr>
<td><a style="cursor:hand" onclick="show('1')"><img name="img1" border="0" src="images/plus.gif" width="10" height="10"> Topic 1</a></td></tr>
<tr id="tr1" class="hide">
<td>Information for Topic 1 here</td>
</tr>
<tr>
<td><a style="cursor:hand" onclick="show('2')"><img name="img2" border="0" src="images/plus.gif" width="10" height="10"> Topic 2</a></td></tr>
<tr id="tr2" class="hide">
<td>Information for Topic 2 here</td>
</tr>
<tr>
<td><a style="cursor:hand" onclick="show('3')"><img name="img3" border="0" src="images/plus.gif" width="10" height="10"> Topic 3</a></td></tr>
<tr id="tr3" class="hide">
<td>Information for Topic 3 here</td>
</tr>
</table>
</body>
</html>
Is it possible to make it work? How?
I'm starting to hate mozilla
Thanks in advance for your time.