Hi there,
I'm new to the board and hope I can get answer from any of you.
My problem: I want to hide an tr in a table based on the innerhtml.
I got this
[HTML]<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<title>Untitled Document</title>
<script language="javascript">
window.onload = function hide(){
<!-- Alert to see if it gets the right tr for test only. -->
alert(document.getElementById("hidethis").innerHTM L);
var hideornot = document.getElementById("hidethis").innerHTML
var div = document.getElementById("hidethis")
if(hideornot == "<td width='100%' bgcolor='#000666'>"){
div.style.display = ' '
}
else
{
div.style.display = 'none'
}
}
</script>
</head>
<body >
<table width="100" border="0" align="center" cellpadding="0" cellspacing="0">
<tr id="hidethis">
<td width="100%" bgcolor="#000666">teds</td>
</tr>
</table>
</body>
[/HTML]
It's not showing or hidding if I change for example the bgcolor to #006666.
Hope you can help me or give me a hint in the right direction.
Thank you for reading
Greetings
Jeroen