Hi,
I am trying to show/hide a row in a table after checking a value.
THis is my code
<html>
<script>
function showDiv()
{
document.getElementById('imageDiv').style.display="block";
}
function hideDiv()
{
document.getElementById('imageDiv').style.display="none";
}
function init(var1)
{
if(var1 == 'novalue')
{
hideDiv()
}
else
{
showDiv()
}
}
</script>
<body onload="init('novalue')">
<table>
<div id ="imageDiv" style="position:absolute;display:none">
<td rowspan="4" align="top>somevalue</td>
</div>
</table>
</body>
</html>
As per the code the row td should not showup, when the page loads. But I can see the row. I am not sure what is wrong in my code.
Thanks for your time and suggestions
regards
I am trying to show/hide a row in a table after checking a value.
THis is my code
<html>
<script>
function showDiv()
{
document.getElementById('imageDiv').style.display="block";
}
function hideDiv()
{
document.getElementById('imageDiv').style.display="none";
}
function init(var1)
{
if(var1 == 'novalue')
{
hideDiv()
}
else
{
showDiv()
}
}
</script>
<body onload="init('novalue')">
<table>
<div id ="imageDiv" style="position:absolute;display:none">
<td rowspan="4" align="top>somevalue</td>
</div>
</table>
</body>
</html>
As per the code the row td should not showup, when the page loads. But I can see the row. I am not sure what is wrong in my code.
Thanks for your time and suggestions
regards