label visible/invisible?

Discussion in 'ASP .Net' started by Gibs, Feb 6, 2004.

  1. Gibs

    Gibs Guest

    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??
    Gibs, Feb 6, 2004
    #1
    1. Advertising

  2. Gibs

    Instead of

    blah.style.visibility = "hidden"

    use

    blah.style.display = "none"

    To show the label, use

    blah.style.display = "block"


    HTH
    E
    =?Utf-8?B?RWQgR2liYnM=?=, Feb 6, 2004
    #2
    1. Advertising

  3. 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!
    Rajagopal Pasupuleti, Feb 6, 2004
    #3
  4. Gibs

    Gibs Guest

    Thanks for the reply.
    I tried this , but i am getting a null error.
    any idea?


    "Gibs" <> wrote in message
    news:...
    > 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??
    >
    >
    >
    Gibs, Feb 6, 2004
    #4
  5. Gibs

    Gibs Guest

    I used this and got it work

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

    and to make hidden

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

    Thanks for all the help



    "Gibs" <> wrote in message
    news:O3mwA%...
    > Thanks for the reply.
    > I tried this , but i am getting a null error.
    > any idea?
    >
    >
    > "Gibs" <> wrote in message
    > news:...
    > > 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??
    > >
    > >
    > >

    >
    >
    Gibs, Feb 9, 2004
    #5
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Susan van Houen

    making webcontrols visible/invisible

    Susan van Houen, Jul 13, 2003, in forum: ASP .Net
    Replies:
    1
    Views:
    550
    Anatoly
    Jul 13, 2003
  2. john
    Replies:
    2
    Views:
    7,098
  3. Miguel Dias Moura

    Make panels visible and invisible.

    Miguel Dias Moura, Jun 17, 2004, in forum: ASP .Net
    Replies:
    3
    Views:
    12,540
    Ireney Berezniak
    Jun 21, 2004
  4. Andy B
    Replies:
    5
    Views:
    567
    Andy B
    May 29, 2008
  5. Knut Krueger
    Replies:
    8
    Views:
    237
    Knut Krueger
    Aug 20, 2013
Loading...

Share This Page