473,795 Members | 3,255 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

disable lables on client side

Is there a way to enable/disable a label through javascript?

Thanks,
Dave
Nov 18 '05 #1
3 1730
A label is just some text. It has no functionality, so how do you envision
disabling it? In what way would the label act differently once it was
'disabled'?

--
I hope this helps,
Steve C. Orr, MCSD, MVP
http://Steve.Orr.net
"headware" <he******@aol.c om> wrote in message
news:e3******** *************** ***@posting.goo gle.com...
Is there a way to enable/disable a label through javascript?

Thanks,
Dave

Nov 18 '05 #2
I just wanted it to "grey out" along with the text box that I was
disabling. I actually found a solution. I was attempting to use the
document.form.e lements collection but the <span> that contained the
label text isn't stored in the that collection. If you use the
document.all.it em() function to get the <span> based on its ID and set
..disabled = "disabled" it works.

Dave

"Steve C. Orr [MVP, MCSD]" <St***@Orr.ne t> wrote in message news:<el******* *******@TK2MSFT NGP10.phx.gbl>. ..
A label is just some text. It has no functionality, so how do you envision
disabling it? In what way would the label act differently once it was
'disabled'?

--
I hope this helps,
Steve C. Orr, MCSD, MVP
http://Steve.Orr.net
"headware" <he******@aol.c om> wrote in message
news:e3******** *************** ***@posting.goo gle.com...
Is there a way to enable/disable a label through javascript?

Thanks,
Dave

Nov 18 '05 #3
This might be excessively undemanding :)
this.Label1.Bac kColor = Color.Gray;

"headware" wrote:
I just wanted it to "grey out" along with the text box that I was
disabling. I actually found a solution. I was attempting to use the
document.form.e lements collection but the <span> that contained the
label text isn't stored in the that collection. If you use the
document.all.it em() function to get the <span> based on its ID and set
..disabled = "disabled" it works.

Dave

"Steve C. Orr [MVP, MCSD]" <St***@Orr.ne t> wrote in message news:<el******* *******@TK2MSFT NGP10.phx.gbl>. ..
A label is just some text. It has no functionality, so how do you envision
disabling it? In what way would the label act differently once it was
'disabled'?

--
I hope this helps,
Steve C. Orr, MCSD, MVP
http://Steve.Orr.net
"headware" <he******@aol.c om> wrote in message
news:e3******** *************** ***@posting.goo gle.com...
Is there a way to enable/disable a label through javascript?

Thanks,
Dave

Nov 18 '05 #4

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

Similar topics

3
15965
by: Alphonse Giambrone | last post by:
I am trying to enable/disable a requiredfieldvalidator on the client side and am generating an error. I had found some documentation on validation which states that I should be able to enable/disable validators on the client side. http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dnaspp/html/aspplusvalid.asp According to it and the little other info I was able to find, the way to accomplish what I want it to call...
1
418
by: Rune | last post by:
Hi I use MMIT to render XHTML pages. How do I disable client caching? I've tried the following commands: Response.CacheControl = "private"; Response.Cache.SetNoStore();
4
2630
by: Tim Meagher | last post by:
I am trying to use both validation controls and to add submit button attributes, but when I add the button attributes, the javascript fpr the validation controls is no longer created for the page. How can I use both? Thank you, Tim Meagher
1
2365
by: Christopher D. Wiederspan | last post by:
I'm wondering if there's a way to use javascript to disable a ASP.NET web page before it starts to postback. Specifically, here's what I'm running into. I've got a webform that has an autopostback dropdown box, and a couple of textboxes just below it. When the user selects an option from the dropdown, it triggers a postback event, which in-turn slightly adjusts the remainder of the page. The problem is that if the user is on a slow...
14
7195
by: Sinity | last post by:
Anyone knows the method/codes to disable the clicked button after first click by using .aspx-- to prevent people to click many time when waiting for the server response. I tried to do this by adding a java script for the button. But, useless.. Please help! Thank you
6
9076
by: Al Cohen | last post by:
I'm using a LinkButton to call some code, then do a redirect. The code does some queries, sends some emails, and takes a few moments before the redirect is performed. I'd like to disable my LinkButton during this period to prevent multiple submissions. (Obviously) the disabling should be done at the client side to prevent any delay. I've tried adding some javascript to LinkButton.Attributes: LinkButton1.Attributes.Add("onclick",...
8
1727
by: jpaul | last post by:
Hi I am very new to this two If the browser disable the javascript, what happen to Ajax? can i slove the problem by using server side script? any suggestion for this? i currently do some dirty projects with perl/cgi, and I would like to add more client side features which relate to ajax, and do some validation on the client side with javascript. but it is possible that the javascript may be disable with some browsers. what can i do if...
3
3467
by: Laurahn | last post by:
Hi: I don't know if it 's possible change the behavior of the IE from asp .net app. I would like the back and forward button be disabled when the users navigates in the asp app. or disable all the navigation toolbar? could it be done with javascript code? could it be possible for mozilla too?
6
2204
by: =?Utf-8?B?Unlhbg==?= | last post by:
Hi, I found out that Text property is perserved, but disable/enable status is not preserved, especially I change this setting of a server side text box with client side javascipt and then post back to server. Is this a bug? Thanks,
0
9672
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
9519
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10438
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
10214
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
10164
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
1
7540
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5563
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
2
3727
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2920
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.