indigoblue
Programmer
i have a function hideMenu:
function hideMenu(menu){
if (document.layers){
hMenu = document.layers[menu];
}
else if (document.all){
hMenu = document.all(menu).style;
}
hMenu.visibility = hidden;
}
That hides divs. I want to make sure that all the divisions are well hidden when the page loads. The divisions are numbered 0-9, so I thought I could have a function called hideAll which went something like this:
function hideAll(){
for(i = 0;i < 10; i++){
if (document.all){
var toHide = document.all(i);
}
else if (document.layers){
var toHide = document.layers;
}
hideMenu(toHide);
}
but it doesn't work (I'm calling it through <body onLoad="hideAll();">
Could someone please put me out of my misery? [sig][/sig]
function hideMenu(menu){
if (document.layers){
hMenu = document.layers[menu];
}
else if (document.all){
hMenu = document.all(menu).style;
}
hMenu.visibility = hidden;
}
That hides divs. I want to make sure that all the divisions are well hidden when the page loads. The divisions are numbered 0-9, so I thought I could have a function called hideAll which went something like this:
function hideAll(){
for(i = 0;i < 10; i++){
if (document.all){
var toHide = document.all(i);
}
else if (document.layers){
var toHide = document.layers;
}
hideMenu(toHide);
}
but it doesn't work (I'm calling it through <body onLoad="hideAll();">
Could someone please put me out of my misery? [sig][/sig]