PDA

View Full Version : Mimicking layers with DIVs



Dusty
October 28th, 2000, 17:52
I wouldn't had posted here but it seems the Site Creation board didn't make the transition. God, I hate linear forums.

Anyway, let's say for example I have five menus named "menu1", "menu2", etc. In Netscape (which supports layers, unlike IE...) each menu would be in a layer and to close them all in JavaScript all I need do is something like this:


for(var i=1;i<=5;i++){
document.layers["menu"+i].visibility="hide";
}

Now, since for some reason IE can never be normal, for the menus to work in it I'd have to use DIV tags. My question: is there a simple way to reference DIVs like there is to reference layers (like the snippet above)?

cds
November 4th, 2000, 00:29
Hmm...I can answer with a yes, but a dont know:

The company I used to work for, simpli.com (which was bought out by NetZero) used javascript to manipulate DIV layers in IE. For the life of me I cant remember how, since it was complicated and integrated with Java Servlets.

However, dont give up...it is possible, just very hard to do... :(