Results 1 to 5 of 5

Thread: problem in coding

  1. #1
    Join Date
    Mar 2007
    Posts
    79
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Unhappy problem in coding

    i have a form in which i have a checkbox.. when i click on the ckeckbox a list has to be displayed,when the checkbox is not clicked the list is hidden..this is happening but the problem is der is a blank space in place of the list whn the checkbox is not clicked..i dont want this space..i have used tables the list is placed insde a row..is der a way to make the entire row ivisible whn the page loads or whn the box is unchecked and it be displayed only whn the box is checked?
    pls help..
    tkanks in advance..

  2. #2
    Join Date
    Sep 2005
    Location
    India
    Posts
    1,627
    Thanks
    6
    Thanked 107 Times in 107 Posts

    Default

    I think you've probably used "visibility" property to hide the list. Try the "display" property instead of "visibility" property.

    Eg:

    Code:
    <div style="display:none" id="hid"></div>
    This hides the div

    Code:
    document.getElementById('hid').style.display = 'block'
    This will make the hidden element visible. Please note that the value 'block' will treat the element as a block element. You can change it to a value that is applicable to your needs, Possible values are

  3. #3
    Join Date
    Mar 2007
    Posts
    79
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    thanks but is der any method to hide the row??i'm not using div here..

  4. #4
    Join Date
    Sep 2005
    Location
    India
    Posts
    1,627
    Thanks
    6
    Thanked 107 Times in 107 Posts

    Default

    You can hide a div element (any element) using the following method.

    Code:
    document.getElementById(id_of_the_element).style.display = 'none';
    The important decision you need to make when you make the element unhide as you can make the element display different based on the values I've provided in my earlier post. Please check those values and also you can find some examples of the same in it.

    Hope this helps.

  5. #5
    Join Date
    Mar 2007
    Posts
    79
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    thanks again will keep u posted if it works

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •