| Author: Maheshkumar shende 10 Apr 2008 | Member Level: Silver Points : 0 |
Your code is
document.getElementById("").style.visibility="hidden";
it will work fine for hiding the control but ones you hide it , i guess you will not able to make it visible again cause 'getElementById("")' will fail to find out the 'id' of hidden control
Try this
Hide
document.getElementById("").style.display="none";
Show
document.getElementById("").style.display="";
Thanks & Regards Maheshkumar
|
| Author: sujatha.m 30 Apr 2008 | Member Level: Bronze Points : 2 |
You have to make it visible again (in formload)
document.getElementById("").style.visibility="visible";
|
| Author: andy robarts 30 Apr 2008 | Member Level: Gold Points : 2 |
Hide
document.getElementById("").style.display="none";
Show
document.getElementById("").style.display="";
|
| Author: Samarth Abrol 01 May 2008 | Member Level: Bronze Points : 2 |
The answer written in the first response is not actually 100% accurate.
We can hide/display the controls using
1) document.getElementById("").style.display="none"/document.getElementById("").style.display="inline"
or
2) document.getElementById("").style.visibility="visible";/document.getElementById("").style.visibility="hidden";
The difference between the two is using the 1st option, we can hide the control and the space occupied by the controls also gets removed, i.e if the controls has a certain height and is contained in a table row, the row gets collapsed and when displayed, the control will again take it's place.and the row will again retain its height by displaying the control in it.
On the other hand if we use 2nd option, the control will get hide but the space occupied by the control will remain as it is and the row will not collapse, i.e the row will still be displayed as blank containing the control in hidden mode.
|
| Author: sanmu 01 May 2008 | Member Level: Bronze Points : 2 |
Hide a control using javascript :
document.getElementById("").style.visibility="hidden";
show :
document.getElementById("").style.visibility="visibile";
|
| Author: Nithya 02 May 2008 | Member Level: Bronze Points : 2 |
document.getElementById("Controlname").style.Visibility="hidden"
|