Wildcat
10-22-2003, 11:21 PM
I had downloaded one of the menu scripts from dynamicdrive.com, and I was trying to edit it so the menu would be willing to move underneath an image. The menu itself is blank on that section, and I tried to set the z-index of the image higher than the menu. However, the instructions provided give me an error in IE, and I was wondering if anyone here could help me out.
function getzIndex(layer) {
if (isMinNS4)
return layer.zIndex;
if (isMinIE4)
return layer.style.zIndex;
return -1;
}
function setzIndex(layer, z) {
if (isMinNS4)
layer.zIndex = z;
if (isMinIE4)
layer.style.zIndex = z;
}
That's the javascript in the external file. They told me I could change z-index by using
setzIndex(z)
so I used
setzIndex(1)
and set the image's z-index at 10 through stylesheets. However, the browser tells me "script is null or not an object" when I refresh the page, and insists on sticking the image underneath the menu. I'd appreciate any help, since this script is a bit beyond my Javascripting knowledge.
function getzIndex(layer) {
if (isMinNS4)
return layer.zIndex;
if (isMinIE4)
return layer.style.zIndex;
return -1;
}
function setzIndex(layer, z) {
if (isMinNS4)
layer.zIndex = z;
if (isMinIE4)
layer.style.zIndex = z;
}
That's the javascript in the external file. They told me I could change z-index by using
setzIndex(z)
so I used
setzIndex(1)
and set the image's z-index at 10 through stylesheets. However, the browser tells me "script is null or not an object" when I refresh the page, and insists on sticking the image underneath the menu. I'd appreciate any help, since this script is a bit beyond my Javascripting knowledge.