Go4Expert (http://www.go4expert.com/)
-   PHP (http://www.go4expert.com/forums/php/)
-   -   Hiding Row (javascript-php-html-css) (http://www.go4expert.com/forums/hiding-row-javascript-php-html-css-t5820/)

coool 12Aug2007 19:46

Hiding Row (javascript-php-html-css)
what do you think of this code? - it's not working what's wrong with it !

PHP Code:

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

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

              <input type="button" value="Display Criteria" onClick="Show('criteria1');">

Code: css


display: none;

when i click on the button.. nothing appear !

pradeep 13Aug2007 11:23

Re: Hiding Row (javascript-php-html-css)
You'll have to put the style for the TR inline, like this

HTML Code:

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

All times are GMT +5.5. The time now is 07:07.