disable lables on client side

  • Thread starter Thread starter headware
  • Start date Start date
H

headware

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

Thanks,
Dave
 
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 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
 
This might be excessively undemanding :)
this.Label1.BackColor = Color.Gray;
 

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

Back
Top