Hey all,
For me it's been a long time since I worked with JavaScript and I managed to get this bit of code to work in IE, but not in FF. Can anyone clue me in where I'm going wrong or what I should change to get it to work FF as well?
It is supposed to show or hide the table when the user clicks on the header tag .
Sample of the webpage:
BobbaFet
For me it's been a long time since I worked with JavaScript and I managed to get this bit of code to work in IE, but not in FF. Can anyone clue me in where I'm going wrong or what I should change to get it to work FF as well?
It is supposed to show or hide the table when the user clicks on the header tag .
Sample of the webpage:
Code:
<html><head><title>Het nieuws van 19-01-2011</title>
<script type="text/JavaScript1.2">
function ShowHide(myTable)
{
var thisTable = document.getElementById(myTable);
if (thisTable.style.display == "none")
{
thisTable.style.display = "block";
}
else
{
thisTable.style.display = "none";
}
}
</script>
</head><body>
<div><h1><center>Het overzicht van PAROOL.nl</center></h1></div>
<br><br><h2 onClick="javascript:ShowHide('PAAmsterdam')">Amsterdam</h2><br><br>
<div id="PAAmsterdam"><table width="100%" cellspacing="20px" cellpadding="0px">
<tr><td>stuff</td>
<td>stuff</td>
<td>stuff</td>
<td>stuff</td></tr>
<tr><td>stuff</td>
<td>stuff</td>
<td>stuff</td>
<td>stuff</td></tr>
</table></div>
</body></html>
BobbaFet
Code:
if not Programming = 'Severe Migraine' then
ShowMessage('Eureka!');