I have a table with two rows.
Each row contains a check box, a text box and two buttons (Up & Down).
The Up and Down buttons move the table rows up and down respectively.
When I click Up and Down on either rows the text in the boxes gets interchanged
but the checkboxes do not maintain its state. Whats up with that?
Happening on IE 6.0.2600.0000
<table id="taboo">
<tr id="r1">
<td>
<input type="checkbox"> <input type="text">
</td>
<td>
<input type="button" value="Down" onclick="down('r1');">
<input type="button" value="Up" onclick="up('r1');">
</td>
</tr>
<tr id="r2">
<td>
<input type="checkbox"> <input type="text">
</td>
<td>
<input type="button" value="Down" onclick="down('r2');">
<input type="button" value="Up" onclick="up('r2');">
</td>
</tr>
</table>
<script>
<!--
function up(id) {
var table = document.getElementById("taboo"
var panel1 = document.getElementById(id);
curr1 = panel1.sectionRowIndex;
table.moveRow(curr1, curr1-1);
}
function down(id) {
var table = document.getElementById("taboo"
var panel1 = document.getElementById(id);
curr1 = panel1.sectionRowIndex;
table.moveRow(curr1, curr1+1);
}
-->
</script>
Each row contains a check box, a text box and two buttons (Up & Down).
The Up and Down buttons move the table rows up and down respectively.
When I click Up and Down on either rows the text in the boxes gets interchanged
but the checkboxes do not maintain its state. Whats up with that?
Happening on IE 6.0.2600.0000
<table id="taboo">
<tr id="r1">
<td>
<input type="checkbox"> <input type="text">
</td>
<td>
<input type="button" value="Down" onclick="down('r1');">
<input type="button" value="Up" onclick="up('r1');">
</td>
</tr>
<tr id="r2">
<td>
<input type="checkbox"> <input type="text">
</td>
<td>
<input type="button" value="Down" onclick="down('r2');">
<input type="button" value="Up" onclick="up('r2');">
</td>
</tr>
</table>
<script>
<!--
function up(id) {
var table = document.getElementById("taboo"
var panel1 = document.getElementById(id);
curr1 = panel1.sectionRowIndex;
table.moveRow(curr1, curr1-1);
}
function down(id) {
var table = document.getElementById("taboo"
var panel1 = document.getElementById(id);
curr1 = panel1.sectionRowIndex;
table.moveRow(curr1, curr1+1);
}
-->
</script>