Is it possible to take an ASP textbox that has an attribute of
visible='hidden' and make it visible from javascript? I dont want it
to be visible until data on the page has been entered and thus need a
way to dynamically change its visibility?
Thanks in advance
Ian Collins - 31 May 2006 07:36 GMT
> Is it possible to take an ASP textbox that has an attribute of
> visible='hidden' and make it visible from javascript? I dont want it
> to be visible until data on the page has been entered and thus need a
> way to dynamically change its visibility?
Yes, you can either fiddle with the object's style.visibility, or assign
it a CSS class with the appropriate style settings.

Signature
Ian Collins.
Thomas 'PointedEars' Lahn - 31 May 2006 12:43 GMT
> Is it possible to take an ASP textbox that has an attribute of
> visible='hidden'
What you call an "ASP textbox" represents no more than an HTML form
control that is generated by server-side ASP.NET code (.NET due to
your mentioning of C#). Probably that server-side code results in
something along
<input ... style="visibility:hidden" />
Read the (_client-side_) Source, Luke.
> and make it visible from javascript?
So if, and only if, client-side script support and sufficient DOM Style
support is available, you can make that control visible again (without
reloading the document):
referenceToControl.style.visibility = "visible";
or standards compliant (W3C DOM Level 2 Style):
referenceToControl.style.setProperty("visibility", "hidden", "");
<URL:http://jibbering.com/faq/>
PointedEars

Signature
I hear, and I forget; I see, and I remember; I do, and I understand.
-- Chinese proverb
Thomas 'PointedEars' Lahn - 31 May 2006 12:45 GMT
> Is it possible to take an ASP textbox that has an attribute of
> visible='hidden'
What you call an "ASP textbox" represents no more than an HTML form
control that is generated by server-side ASP.NET code (.NET due to
your mentioning of C#). Probably that server-side code results in
something along
<input ... style="visibility:hidden" />
Read the (_client-side_) Source, Luke.
> and make it visible from javascript?
So if, and only if, client-side script support and sufficient DOM Style
support is available, you can make that control visible again (without
reloading the document):
referenceToControl.style.visibility = "visible";
or standards compliant (W3C DOM Level 2 Style):
referenceToControl.style.setProperty("visibility", "visible", "");
<URL:http://jibbering.com/faq/>
PointedEars

Signature
I hear, and I forget; I see, and I remember; I do, and I understand.
-- Chinese proverb