Hi,
Not working even without me typo !
Sorry !
Hi,
Anyone know if it's possible to set the visibilty of a servercontrol thru
javascript.
Think it would go something like this, but its not working:
document.forms[0]['TextBox1'].style.visibility == 'hidden'
Thanks
T.
JavaScript can only control a CSS style attribute if it is set in the
first place. In your case, you must get the server-side control to add a
"style" attribute with the value "visibility: visible;". This is usually
done using the control's Attributes collection.
Note that for this kind of effects, you probably rather want to use
display: "display: block;".
After that, JavaScript can access the element, and modify the style
attribute:
if ( document.getElementById( "TextBox1" )
&& document.getElementById( "TextBox1" ).style
&& document.getElementById( "TextBox1" ).style.display )
{
document.getElementById( "TextBox1" ).style.display = "none";
}
HTH,
Laurent
--
Laurent Bugnion, GalaSoft
Software engineering:
http://www.galasoft-LB.ch
PhotoAlbum:
http://www.galasoft-LB.ch/pictures
Support children in Calcutta:
http://www.calcutta-espoir.ch