PDA

View Full Version : How to access layer in NN 6.0?


tam
23.08.2001, 21:29
Hi,

I have following code in the function. And I find that the image swapping
works in NN 4.08, IE 4.0 and above, but fails in NN 6.0. Can you suggest me
what mistake I'm making?

Tam

---------------------------------------------------

function swapImage(layerName,imgName, imgSrc)

if(is_ie4up) {
file://alert("is_ie4up :" + is_ie4up);
file://alert("is_nav5up :" + is_nav5up);
document.all[layerName].document.images[imgName].src= imgSrc;
}
else if (is_nav4) {
file://alert("is_nav4 :" + is_nav4);
document.layers[layerName].document.images[imgName].src= imgSrc;
}
else{
alert("else");
document.all.layerName.document.images[imgName].src= imgSrc;
}
}

Royan
24.08.2001, 07:00
No the way is a bit different. do like that:
document.getElementById("divId").style ...//Here goes top, width etc.
<div id="divId"></div>