Wednesday, March 31, 2010

Re: Possible to blank (hide) columns and show those again in a complete rendered view?

Hello,

With this code, my problem is solved.

[CODE]
<script type="text/javascript">
function toggleColumn(table, column) {
for (var i = 0; i < table.rows.length; i++){
if (table.rows[i].cells.length > column){
var cell = table.rows[i].cells[column];
cell.style.display = (cell.style.display == "none")? "": "none";
}
}
}
</script>
[/CODE]


[View CODE]
<table>
<tr>
<td><a
onclick="toggleColumn(document.getElementById('tab1'), 1);">1</a></td>
<td><a
onclick="toggleColumn(document.getElementById('tab1'), 2);">2</a></td>
<td><a
onclick="toggleColumn(document.getElementById('tab1'), 3);">3</a></td>
<td><a
onclick="toggleColumn(document.getElementById('tab1'), 4);">4</a></td>
<td><a
onclick="toggleColumn(document.getElementById('tab1'), 5);">5</a></td>
<td><a
onclick="toggleColumn(document.getElementById('tab1'), 6);">6</a></td>
</tr>
</table>

<br><p>

<table id="tab1">
<tr>
<th>[Optionen]</th>
<th>...</th>
...
[/CODE]

Check out the new CakePHP Questions site http://cakeqs.org and help others with their CakePHP related questions.

You received this message because you are subscribed to the Google Groups "CakePHP" group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to
cake-php+unsubscribe@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php?hl=en

To unsubscribe, reply using "remove me" as the subject.

No comments: