Solved

Protect the label

Posted on 2014-07-23
7
158 Views
Last Modified: 2014-07-24
Hi,
what is the way to protect the label below?

<input type="label" id="lb_p1" style="height:14px; width:92px; font-size:x-small; border:none; background-color:#1BA8E0" value="desc1" runat="server" /><br/>

Open in new window

0
Comment
Question by:HuaMinChen
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
7 Comments
 
LVL 7

Expert Comment

by:cstsang
ID: 40213774
What do you mean "protect"?
0
 
LVL 11

Author Comment

by:HuaMinChen
ID: 40213781
Make it non-editable.
0
 
LVL 81

Expert Comment

by:David Johnson, CD, MVP
ID: 40213828
Labels are not editable by default unlike a textbox that is editable, so I don't understand your question
0
Salesforce Made Easy to Use

On-screen guidance at the moment of need enables you & your employees to focus on the core, you can now boost your adoption rates swiftly and simply with one easy tool.

 
LVL 53

Expert Comment

by:COBOLdinosaur
ID: 40215029
Just add disabled to the attributes. and it will not accept input.

Cd&
0
 
LVL 11

Author Comment

by:HuaMinChen
ID: 40215860
COBOL,
how to add "disabled"?
0
 
LVL 11

Accepted Solution

by:
azarc3 earned 190 total points
ID: 40216806
I'm not 100% certain what you're trying to accomplish.... but Labels aren't editable. As far as I can tell what you have isn't valid HTML as there is no input type="label" that I can find.

More than likely it's editable because you've got the input tag.

I think you meant to do the following:
<label id="lb_p1" style="height:14px; width:92px; font-size:x-small; border:none; background-color:#1BA8E0">desc1</label><br/>

Open in new window

Finally, Labels are container tags and should have both the opening <label> and the closing </label>. You can read more about it here.
0
 
LVL 53

Expert Comment

by:COBOLdinosaur
ID: 40217066
Yeah label is not valid but that just means the browser will default to text. As fo adding disabled you just put it in the tag with the rest of the attributes.  No offense intended, but is this your first attempt at HTML?

Cd&
0

Featured Post

Announcing the Most Valuable Experts of 2016

MVEs are more concerned with the satisfaction of those they help than with the considerable points they can earn. They are the types of people you feel privileged to call colleagues. Join us in honoring this amazing group of Experts.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Having worked on larger scale sites, we found out that you are bound to look at more scalable solutions to integrating widgets, code snippets or complete applications and mesh them into functional sites, in any given composition. To share some of…
Introduction A frequently asked question goes something like this:  "I am running a long process in the background and I want to alert my client when the process finishes.  How can I send a message to the browser?"  Unfortunately, the short answer…
The viewer will learn the basics of jQuery, including how to invoke it on a web page. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery.: (CODE)
The viewer will learn the basics of jQuery including how to code hide show and toggles. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery…

729 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question