View Single Post
Old 01-29-2013, 05:55 PM   PM User | #4
sunfighter
Senior Coder

 
Join Date: Jan 2011
Location: Missouri
Posts: 2,498
Thanks: 18
Thanked 361 Times in 360 Posts
sunfighter is on a distinguished road
In your post you should see in the bottom right a black button with EDIT in it. That should do it for you.

I don't know why your using PHP to write out the page or the javascript, but look into heredoc in PHP.

Fast table with the first and last <td> show/hiding the middle row.
Code:
<!DOCTYPE html>
<html>
<head>
<script>
function toggle() {
 if( document.getElementById("hidethis").style.display=='none' ){
   document.getElementById("hidethis").style.display = '';
 }else{
   document.getElementById("hidethis").style.display = 'none';
 }
}
</script>
</head>
<body>

<table border="1">
<tr>
	<td onclick="toggle();">Always visible</td>
	<td>Always visible</td>
	<td>Always visible</td>
</tr>

<tr id="hidethis">
	<td>Hide this</td>
	<td>Hide this</td>
	<td>Hide this</td>
</tr>

<tr>
	<td>Always visible</td>
	<td>Always visible</td>
	<td onclick="toggle();">Always visible</td>
</tr>

</table>
</body>
</html>
sunfighter is offline   Reply With Quote