Hi,
I have a webpage where I use a javascript function (below) in order to make my page behave like a tree menu (basically, when you click the plus a hidden cell displays and when you click the minus it hides). However, Netscape keeps giving me the following error:
document.cmarquee01 has no properties.
...
document.getElementById is not a function.
But this is a function! Does anyone have any ideas why it's not working? I've tried it in Netscape 4, 6, and 7 -- in 7, it works but opens a blank javascript error page.
Thanks~
<script language="javascript">
function ToggleExpanded(cellID, gifID) {
// Toggle visible or not
if (document.getElementById(cellID).style.display=='block') {
document.getElementById(cellID).style.display='none'
} else {
document.getElementById(cellID).style.display='block'
}
// Toggle images
if (document.getElementById(cellID).style.display=='block') {
document.getElementById(gifID).src='images/minus.gif'
} else {
document.getElementById(gifID).src='images/plus.gif'
}
}
</script>
I have a webpage where I use a javascript function (below) in order to make my page behave like a tree menu (basically, when you click the plus a hidden cell displays and when you click the minus it hides). However, Netscape keeps giving me the following error:
document.cmarquee01 has no properties.
...
document.getElementById is not a function.
But this is a function! Does anyone have any ideas why it's not working? I've tried it in Netscape 4, 6, and 7 -- in 7, it works but opens a blank javascript error page.
Thanks~
<script language="javascript">
function ToggleExpanded(cellID, gifID) {
// Toggle visible or not
if (document.getElementById(cellID).style.display=='block') {
document.getElementById(cellID).style.display='none'
} else {
document.getElementById(cellID).style.display='block'
}
// Toggle images
if (document.getElementById(cellID).style.display=='block') {
document.getElementById(gifID).src='images/minus.gif'
} else {
document.getElementById(gifID).src='images/plus.gif'
}
}
</script>