Solved

Protect the label

Posted on 2014-07-23
7
157 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 10

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
Revamp Your Training Process

Drastically shorten your training time with WalkMe's advanced online training solution that Guides your trainees to action.

 
LVL 53

Expert Comment

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

Cd&
0
 
LVL 10

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

Online Training Solution

Drastically shorten your training time with WalkMe's advanced online training solution that Guides your trainees to action. Forget about retraining and skyrocket knowledge retention rates.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
isNaN issue on the Table input text 2 38
Jquery Calculation 3 36
Bootstrap - BootBox - PHP - MYSQL - Response Trigger 6 51
Difference between Highcharts and Mapbox 10 41
jQuery is a JavaScript library that greatly simplifies JavaScript programming. AJAX is an acronym formed from "Asynchronous JavaScript and XML."  AJAX refers to any communication between client and server, when the human client does not observe a…
Today, the web development industry is booming, and many people consider it to be their vocation. The question you may be asking yourself is – how do I become a web developer?
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…

738 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