I have a table with three rows. Each row has a label and a text-box. The second row is initially hidden.
The code below will make the second row visible if the number in the first text box is more than one.
However, if one enters a number in the first box, and presses TAB, then the cursor is moved to the third text box - because the second text box is not yet visible.
Is there a neat way of getting the cursor to TAB to the second text box, in the event that the second row will be made visible?
Thanks
<SCRIPT>
function changePrinciplePayments(aVal) {
if (aVal > 1) {
$('#paymentFrequency').show();
} else {
$('#paymentFrequency').hide();
}
}
</SCRIPT>
<table>
<tr class="Blocks">
<td>Number of Payments:</td>
<td><input class="Form80" id="numPrincipalPayments" onblur=
"changePrinciplePayments(this.value);" tabindex="18" type=
"text"></td>
</tr>
<tr class="Blocks" id="paymentFrequency" style="display:none;">
<td>Payment Frequency:</td>
<td><input tabindex="19" type="text"></td>
</tr>
<tr class="Blocks" id="paymentType">
<td>payment Type:</td>
<td><input tabindex="20" type="text"></td>
</tr>
</table>