473,387 Members | 1,388 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,387 software developers and data experts.

disable lables on client side

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

Thanks,
Dave
Nov 18 '05 #1
3 1716
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.com> wrote in message
news:e3**************************@posting.google.c om...
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.elements collection but the <span> that contained the
label text isn't stored in the that collection. If you use the
document.all.item() function to get the <span> based on its ID and set
..disabled = "disabled" it works.

Dave

"Steve C. Orr [MVP, MCSD]" <St***@Orr.net> wrote in message news:<el**************@TK2MSFTNGP10.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.com> wrote in message
news:e3**************************@posting.google.c om...
Is there a way to enable/disable a label through javascript?

Thanks,
Dave

Nov 18 '05 #3
This might be excessively undemanding :)
this.Label1.BackColor = 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.elements collection but the <span> that contained the
label text isn't stored in the that collection. If you use the
document.all.item() function to get the <span> based on its ID and set
..disabled = "disabled" it works.

Dave

"Steve C. Orr [MVP, MCSD]" <St***@Orr.net> wrote in message news:<el**************@TK2MSFTNGP10.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.com> wrote in message
news:e3**************************@posting.google.c om...
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
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...
1
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
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. ...
1
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...
14
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...
6
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...
8
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...
3
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...
6
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...
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
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?
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
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,...
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...

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.