accessing c# attributes

D

david sargent

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
 
I

Ian Collins

david said:
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.
 
T

Thomas 'PointedEars' Lahn

david said:
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
 
T

Thomas 'PointedEars' Lahn

david said:
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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
474,431
Messages
2,571,679
Members
48,796
Latest member
Greg L.

Latest Threads

Top