Hi,
Can anyone suggest why this isn't working in FF?
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.
..gives:
Source File: http://www.site.com/cgi-bin/add_more_info.cgi?ID=18
Line: 71
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 (mod)
andy@ultranerds.co.uk
IMPORTANT: I've now moved to ultranerds.co.uk, and the .com will no longer work!
Want to give me something back for my help? Please see my Amazon Wish List
GLinks ULTRA Package (plugins total "value" $3,325 & rising, for just $350)| GLinks ULTRA Package PRO (plugins total "value" $5,625 & rising, for just $500)
Support Forum | Links SQL Plugins | DMOZ Dumps | UltraNerds | ULTRAGLobals Plugin | Pre-Made Template Sets | FREE GLinks Plugins!
Compare our different Plugin packages *new* Free CSS Templates
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:
Quote:
Error: title_div is not defined Source File: http://www.site.com/cgi-bin/add_more_info.cgi?ID=18
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 (mod)
andy@ultranerds.co.uk
IMPORTANT: I've now moved to ultranerds.co.uk, and the .com will no longer work!
Want to give me something back for my help? Please see my Amazon Wish List
GLinks ULTRA Package (plugins total "value" $3,325 & rising, for just $350)| GLinks ULTRA Package PRO (plugins total "value" $5,625 & rising, for just $500)
Support Forum | Links SQL Plugins | DMOZ Dumps | UltraNerds | ULTRAGLobals Plugin | Pre-Made Template Sets | FREE GLinks Plugins!
Compare our different Plugin packages *new* Free CSS Templates

