English Deutsch Français Italiano Español Português 繁體中文 Bahasa Indonesia Tiếng Việt ภาษาไทย
All categories

I tried to name a

and on the click of a button:

function hideDiv(){
window. document. topdiv. style. visibility = "hidden";
}

(I used spaces to keep anything from being editted)

Why is it not working? Is the visibility of a non graphical element frozen? This works perfectly AS IS for all my images.

2006-09-20 14:51:11 · 2 answers · asked by Rockstar 6 in Computers & Internet Programming & Design

2 answers

Try referring to the

by its #id. Then you can get a handle on it with document.getElementById("id"). It works for elements as well.

document.getElementById( 'brigadoon' ).style.visibility = 'hidden';

2006-09-20 19:38:09 · answer #1 · answered by G. Whilikers 7 · 0 0

You want to use ... style. display = "none" and = "block" to display it again.

2006-09-20 23:40:24 · answer #2 · answered by sterno73 3 · 0 0

fedest.com, questions and answers