1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Hiding Row (javascript-php-html-css)

Discussion in 'PHP' started by coool, Aug 12, 2007.

  1. coool

    coool New Member

    Joined:
    Jul 12, 2007
    Messages:
    46
    Likes Received:
    0
    Trophy Points:
    0
    what do you think of this code? - it's not working what's wrong with it !

    PHP:
    <script type="text/javascript">
    function Show(e)
    {
            if(document.getElementById(e).style.display == 'none')
            {
                    document.getElementById(e).style.display = 'block';
            }
    }
    </script>

    <tr id='criteria1'>
            <?echo CriteriaRow();?>
     //this function have some form elements/html similar to the picture in one of my posts
    </tr>

                  <input type="button" value="Display Criteria" onClick="Show('criteria1');">
    Code:
    #criteria1
    {
    display: none;
    }
    
    when i click on the button.. nothing appear !
     
  2. pradeep

    pradeep Team Leader

    Joined:
    Apr 4, 2005
    Messages:
    1,646
    Likes Received:
    86
    Trophy Points:
    0
    Occupation:
    Programmer
    Location:
    Kolkata, India
    Home Page:
    You'll have to put the style for the TR inline, like this

    HTML:
    <tr id='criteria1' style="display:none"> 
     

Share This Page