Hello,
I have a js function that is triggered with the onclick event. In particular, there is a <tr> in a table that is shown when the user clicks on the “Show” button.
In HTML I have:
[code]
<tr> <td>
<img id=”myimage” src=”css/images/show.png” onclick=”javascript:HideShow(‘myrow’);”/>
</td>
</tr><tr id=”myrow” style=”display:none”>
<td>Hello all!
</td>
</tr>
and the JS part is:
[code]
<script type=”text/javascript”>
function HideShow(myVar)
{
if (document.getElementById(myVar).style.display == ‘none’)
{
document.getElementById(myVar).style.display = ‘inline’
}
else
{
document.getElementById(myVar).style.display = ‘none’
}
}
</script>
The function works fine, that is, when the user clicks on the image, the tr appears and then, if the user clicks again, it disappears… BUT all these work perfectly with IE, whereas in Firefox, the contents of the tr appear and disappear when the image is clicked, however, when the user clicks twice, the “Hello world” data disappears, but a blank row remains…And, if you do that again and again, I end up with as much blank rows as the times that I click the button for the data to disappear…
Is this something like a bug? Can I do anything else?