473,403 Members | 2,071 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,403 software developers and data experts.

accessing c# attributes

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

May 31 '06 #1
3 4176
david sargent wrote:
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.

--
Ian Collins.
May 31 '06 #2
david sargent wrote:
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
--
I hear, and I forget; I see, and I remember; I do, and I understand.
-- Chinese proverb
May 31 '06 #3
david sargent wrote:
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
--
I hear, and I forget; I see, and I remember; I do, and I understand.
-- Chinese proverb
May 31 '06 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
by: JM | last post by:
Hello everyone, Does anybody know about, have documentation on, or have any code samples on how to access class members from a python class in C++. Say I have a simple python script: ...
2
by: Marc A. Criley | last post by:
First off, I'm an experienced software developer but new to XML, so be gentle :-) I've put together a schema that defines optional attributes for some of the elements. Some of these attributes...
1
by: wooks | last post by:
I have some information embedded in included schemas which I want to access at run-time for the purposes of contructing a GUI (they will support field labels and tool tips). The options seem to...
4
by: Mike Clair | last post by:
Hey, I'm having an issue with CSS, JS and the DOM. It's gonna drive me batty. I am trying to access the properties of a layer in JS which have been initially set in an external CSS. The problem...
2
by: Erwin S. Andreasen | last post by:
Hi, I have a web application where window A opens window B (same site). B later wants to do something depending on whether the window A, window.opener.document.domain, has changed. However,...
2
by: damonf | last post by:
I'm currently trying to add an ASP hyperlink to a template column in a datagrid. The normal hyperlink column doesn't give me the ability to add attributes to the item. In my grid there are four...
2
by: Steve Black | last post by:
Hello, I am dynamically creating checkboxes on my web page based on data in a SQL Server table. Therefore, these checkboxes do not exist at design time and I cannot refer to them in my...
7
by: rein.petersen | last post by:
Hey All, I was wondering if there were a way for a script to access it's parent tag without having to use the document.all.tags method which doesn't necessarily identify it if there are more...
3
by: Beorne | last post by:
In the classes I develop my attributes are always private and are exposed using properties. directly or to access the attributes using the properties? Does "wrapper" setter/getter properties...
2
Rafael Justo
by: Rafael Justo | last post by:
Hi, I'm new in python development (NEWBIE). While I was using Cheetah Templates I got a problem about accessing template variables. I have an object like this (class Template): >>> class...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.