?
Solved

EASY Checkbox label will not hide -  the box does

Posted on 2006-03-31
1
Medium Priority
?
924 Views
Last Modified: 2008-03-10
Hello Everyone -

I am using a .net CheckBox object.

I need the box and the Text Label to hide - but the label is stubborn
and remains displayed -

Here is my syntax -


<asp:CheckBox ID="chkBoxOptionsAdmin" runat="server" Checked="True" Text="Yes?"
                                                                              TextAlign="Left" Width="49px" />

document.getElementById('chkBoxOptionsAdmin').style.display = 'none';
document.all.chkBoxOptionsAdmin.checked=false;



??? Can Javascript hide the label ? or do I need a .net command?
 '<%chkBoxOptionsAdmin.Text=""%>'
 
Thanks
0
Comment
Question by:paygo
1 Comment
 
LVL 36

Accepted Solution

by:
Zyloch earned 2000 total points
ID: 16345917
To hide all of it, you need to put both the checkbox and its label within a <span> tag with its own ID. Then, getElementById() that span tag.
0

Featured Post

Free Tool: ZipGrep

ZipGrep is a utility that can list and search zip (.war, .ear, .jar, etc) archives for text patterns, without the need to extract the archive's contents.

One of a set of tools we're offering as a way to say thank you for being a part of the community.

Question has a verified solution.

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

This article discusses the difference between strict equality operator and equality operator in JavaScript. The Need: Because JavaScript performs an implicit type conversion when performing comparisons, we have to take this into account when wri…
This article demonstrates how to create a simple responsive confirmation dialog with Ok and Cancel buttons using HTML, CSS, jQuery and Promises
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…
Suggested Courses

839 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