This is odd, i've looked over the code several times and i can't figure out why it is working in IE and not Netscape. Basically, this is a script that allows a layer to open (used like a menu). it works across frames (the layer opens in the window created by the rest of the html in this page) and opens on a graphic click. that works. then if the frame scrolls, it allows the opened layer to move (floating layer) up/down dependent on scrollbar position. Now, here's the problem. when i click on one menu (there are only 2) it opens. then click on the other, the 1st closes and the 2nd opens. good. however, if i click the 2nd one again, when it is supposed to close, it doesnt!!! good news is, it works for internet explorer exactly the way i described. okay, enough explaining, here is the code.
thank you very much for your time. i'm hoping someone out there is able to understand how the above code is interpreted in both browsers...
Code:
function posLayer(layerName) {
if (navigator.appName == "Netscape") {
yPos = parseInt(window.pageYOffset);
} else {
yPos = document.body.scrollTop;
}
eval(layerRef+'["'+layerName+'"]'+styleSwitch+'.top = yPos');
}
function showHideLayerSwitch(layerName) {
clearInterval(killID);
if(eval(layerRef+'["'+layerName+'"]'+styleSwitch+'.visibility=="visible"')) {
eval(layerRef+'["'+layerName+'"]'+styleSwitch+'.visibility="hidden"');
} else {
if (navigator.appName == "Netscape") {
yPos = parseInt(window.pageYOffset);
} else {
yPos = document.body.scrollTop;
}
eval(layerRef+'["'+layerName+'"]'+styleSwitch+'.top = yPos');
killID = setInterval('posLayer("'+layerName+'")', 250);
eval(layerRef+'["'+layerName+'"]'+styleSwitch+'.visibility="visible"');
}
}
thank you very much for your time. i'm hoping someone out there is able to understand how the above code is interpreted in both browsers...