Click to See Complete Forum and Search --> : Can a Button be Made Invisible Via Javascript


clyde
10-31-2003, 08:38 AM
I have several butons in my HTML, Depending on conditions
can I make buttons visible or invisible via Java Script

Khalid Ali
10-31-2003, 08:59 AM
yes..you can use CSS properties such as
visibility and display

suppose you had an input element of type button name="btn"
in a form name="form1"

following will make it disappear

document.form1.btn.style.visibility="hidden";

and following will make it re appear

document.form1.btn.style.visibility="visible";

clyde
10-31-2003, 09:23 AM
I Appreciate your help