Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
Discussion GroupsGeneralPHPASPPerlColdFusionFlashHTML, CSS, ScriptsBrowsers

Webmaster Forum / HTML, CSS, Scripts / JavaScript / May 2006



Tip: Looking for answers? Try searching our database.

accessing c# attributes

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
david sargent - 31 May 2006 07:00 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?

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

 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2009 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.