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

label visible/invisible?

Hi,
How can i make a label visible/invisible? I am able to do it for text box by
using document.form1.TextBox1.style.visibility="hidden"; But when i am
giving the same for the label, i am getting an error.

any idea??

Nov 18 '05 #1
4 10913
Gibs

Instead of

blah.style.visibility = "hidden"

use

blah.style.display = "none"

To show the label, use

blah.style.display = "block"
HTH
E

Nov 18 '05 #2
put the label inside a <div id=mydiv> tag
and call window.mydiv.style.visibility="hidden"

Rajagopal Pasupuleti
*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!
Nov 18 '05 #3
Thanks for the reply.
I tried this , but i am getting a null error.
any idea?
"Gibs" <do*********@yahoo.com> wrote in message
news:eR**************@tk2msftngp13.phx.gbl...
Hi,
How can i make a label visible/invisible? I am able to do it for text box by using document.form1.TextBox1.style.visibility="hidden"; But when i am
giving the same for the label, i am getting an error.

any idea??

Nov 18 '05 #4
I used this and got it work

this.document.getElementById('Label1').style.visib ility="visible";

and to make hidden

this.document.getElementById('Label1').style.visib ility="hidden";

Thanks for all the help

"Gibs" <do*********@yahoo.com> wrote in message
news:O3****************@TK2MSFTNGP12.phx.gbl...
Thanks for the reply.
I tried this , but i am getting a null error.
any idea?
"Gibs" <do*********@yahoo.com> wrote in message
news:eR**************@tk2msftngp13.phx.gbl...
Hi,
How can i make a label visible/invisible? I am able to do it for text
box by
using document.form1.TextBox1.style.visibility="hidden"; But when i am
giving the same for the label, i am getting an error.

any idea??


Nov 18 '05 #5

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
by: Jim | last post by:
I have a report that needs disclamers at the bottom of each page except the first two. The discamer is in the form of a label in the page footer. I tried adding this line to the page footer...
7
by: Jared | last post by:
Here is my situation. I have multiple labels on a form but only certain ones will become visible while using the form. Depending on which check box(s) you pick, on another form, determines the...
3
by: Kevin Cunningham | last post by:
I have a repeater with some labels in it (code below). For whatever reason the text for the label is not persisted in viewstate on the postback. Is there a trick to get this to work? Is there...
2
by: What-a-Tool | last post by:
Decided to try and do it this way just to see if I could. My form appears with a rectangular hole in the center the size of my label. can anyone tell me why, and if it can be made visible? ...
2
by: Able | last post by:
Dear friends Why is this label invisible: Dim myLbl As New Label myLbl.BorderStyle = BorderStyle.FixedSingle myLbl.BackColor = Color.White myLbl.ForeColor = Color.Black myLbl.Size = New...
3
by: rockdale | last post by:
Hi, All: I have a datagrid with TemplateColumn as following: <asp:TemplateColumn Visible="False" > <ItemStyle Width="0px"></ItemStyle> <ItemTemplate> <asp:Label id="lblMin_Value"...
11
by: Peter Larsen [] | last post by:
Hi, I have two questions related to the Label control. How do i prevent the label from expand the canvas into 2 lines (word wrap) ?? At the moment i set AutoSize to false (to prevent the word...
3
by: Mufasa | last post by:
Is there any real difference between using a hidden field and using a label that is not visible. My thought being that I could leave the labels visible while testing but make them invisible once...
8
fayazmd
by: fayazmd | last post by:
Hi, I am stuck with a problem on labels. I have 30 labels on my from. And from one method i am returning a value, based on it i have to make one label as invisible. I took switch - case, but i...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
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...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
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...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...

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.