Hi
Appologies for asking a question that probably gets asked all the time, but I was hoping to use dhtml to control the visibility of an element (a menu of links) using style.
I can make it work with MSIE but in Netscape nothing happens.
This is the js function that controls it. Is there something wrong with the script or is there another issue elsewhere that I’m doing wrong…
[code]
function barTog(menu) {
if (document.layers) {
menu1 = document.layers[menu];
} else if (document.all) {
menu1 = document.all(menu).style
}
if (menu1.visibility == visible) {
menu1.visibility = hidden;
}
else {
menu1.visibility = visible;
document.loginform.username.focus();
}
if (lastMenu != menu) {
closeMenus(lastMenu);
}
lastMenu = menu;
}
Help advice, pointers, or alternatives appreciated.
Thanks