Hi,
Can anyone suggest why this isn't working in FF?
Basically, it all works - appart from the last few lines.
..gives:
Guessing I'm using the wrong format with this bit:
...any suggestions? (I've had a look on google, but couldn't find anything helpful :/)
Cheers
Andy
Can anyone suggest why this isn't working in FF?
Code:
<script>
function showhide(id){
if (document.getElementById){
obj = document.getElementById(id);
if (obj.style.display == "none"){
obj.style.display = "";
} else {
obj.style.display = "none";
}
if (id != 'title_div') { title_div.style.display = "none"; }
if (id != 'subheader_div') { subheader_div.style.display = "none"; }
if (id != 'lead_div') { lead_div.style.display = "none"; }
if (id != 'video_div') { video_div.style.display = "none"; }
if (id != 'testimonials_div') { testimonials_div.style.display = "none"; }
if (id != 'header_div') { header_div.style.display = "none"; }
}
}
</script>
Basically, it all works - appart from the last few lines.
Code:
if (id != 'title_div') { title_div.style.display = "none"; }
..gives:
Error: title_div is not defined
Source File: Line: 71
Guessing I'm using the wrong format with this bit:
Code:
title_div.style.display
...any suggestions? (I've had a look on google, but couldn't find anything helpful :/)
Cheers
Andy