Displaying hidden DIVs in netscape using javascript
Posted: Tue Aug 12, 2003 3:04 pm
Hello,
i currently have the following script
this allows me to show/ hide the div tags on a onClick()
my problem is the handling of this script with netscape...i get it to work with IE all versions but not netscape not even v7
does anyone have the formula for netscape?
Kendall
i currently have the following script
Code: Select all
<!--
var ns4 = (document.layers);
var ie4 = (document.all && !document.getElementById);
var ie5 = (document.all && document.getElementById);
var ns6 = (!document.all && document.getElementById);
var ns7 = (document.all && document.getElementById);
function attach(id)
{
var obj
if(ns4) obj=document.layersїid];
else if(ie4) obj = document.allїid];
else if(ie5 || ie6) obj = document.getElementById(id);
return obj
}
function toggleVisibility(id)
{
temp_obj = attach(id);
if(ns4)
if (temp_obj.display=="none") temp_obj.display="";
else temp_obj.display="none";
else if (temp_obj.style.display == "none")
temp_obj.style.display = "";
else temp_obj.style.display = "none";
}my problem is the handling of this script with netscape...i get it to work with IE all versions but not netscape not even v7
does anyone have the formula for netscape?
Kendall