I'm a javascript noobie - struggling with some cross platform issues :-) The attached code works fine in Firefox / Safari etc but of course not in IE 8
It should be a simple disclosure. The show/hide div works fine, it is just the text that does not change to show the new state.
I know that it is an issue with the innerHTML - but I do NOT know how to fix it ...
Please help... been bashing my head against this particular wall since yesterday.
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-type" content="text/html;charset=UTF-8">
<style type="text/css">
body { border: 0px; }
*{ font: 11px \Lucida Grande\, Verdana, sans-serif; }
table { width:100% ; border: 0px ; border-spacing: 0px ; table-layout: fixed ; }
td { border: 0px }
.values { vertical-align:text-top }
.labelGreen { font-weight:bold ; color: #008000 ; }
td.auto { width:auto; }
.empty { margin:auto }
ul { list-style: none; margin: 0; padding: 0;}
a { color: #888; text-decoration: none; font-weight: bold; font-size: 10px; }
</style>
<script type="text/javascript">
function toggle_visibility1(id)
{
var e = document.getElementById(id);
if (e.style.display == "none")
{
e.style.display = "block";
document.getElementById("triOpen1").innerHTML = "<a href="javascript:openTri()">Close</a>";
}
else {
e.style.display = "none";
document.getElementById("triOpen1").innerHTML = "<a href="javascript:cloTri()">Open</a>";
}
}
</script>
<title></title>
</head>
<body>
<table>
<tr>
<td class="auto" colspan ="4">These entities, related to THIS Methodology, are already included in this Model Extract</td>
</tr>
<tr>
<td class="labelGreen"><a href="#tri" onclick="toggle_visibility1('tri1');"><span id="triOpen1">Open</span></a> ABBS 5 </td>
<td class="labelGreen">Devices 15</td>
<td class="labelGreen">Processes 2</td>
<td class="labelGreen">Tests 13</td>
</tr>
</table>
<div id="tri1" style="display:none;">
<table>
<tr>
<td class="values">Abbs List to go here</td>
<td class="values">Dev List to go here</td>
<td class="values">Process List to go here</td>
<td class="values">Testing List</td>
</tr>
</table>
</div>
</body>
</html>