Set tab to skip fields -- or tab down

S

sfp

My table rows are defined as a dynamic array like


<tr class="formTr<%=bgcount%>" >
<td class="formTds" nowrap><%=arrayWeek%></td>
<td class="formTds" nowrap><%=strToChange(arrayDay)%></td>
<td><input name="AUnit" class="textNoSize" maxlength="4" value="<
%=strToNull(arrayAUnit)%>" onKeypress="return isKeyNumberdot(0)" <
%=edit_flag%> ></td>
<td><input name="BUnit" class="textNoSize" maxlength="4" value="<
%=strToNull(arrayBUnit)%>" onKeypress="return isKeyNumberdot(0)" <
%=edit_flag%> ></td>
<td><input name="CUnit" class="textNoSize" maxlength="4" value="<
%=strToNull(arrayCUnit)%>" onKeypress="return isKeyNumberdot(0)"
onkeydown="if(event.keyCode==13){event.keyCode=9;}" <%=edit_flag%> ></
td>
<td><input name="TUnit" value="<%=strToNull(arrayTUnit)%>"
class="input-dis" disabled></td>
</tr>

This essentially puts three columns of data in x rows. When the
cursor is in, say, column 1, and the TAB key is pressed, I would like
focus to be set to the cell in the next row immediately below the
current row. I tried

onkeydown="if(event.keyCode==9){event.keyCode=11;}"

but this puts the cursor in the browser address bar. My app is
internal use only, only IE supported.

Thanks in advance,
Steve
 
M

mrcakey \(The Eclectic Electric\)

sfp said:
My table rows are defined as a dynamic array like


<tr class="formTr<%=bgcount%>" >
<td class="formTds" nowrap><%=arrayWeek%></td>
<td class="formTds" nowrap><%=strToChange(arrayDay)%></td>
<td><input name="AUnit" class="textNoSize" maxlength="4" value="<
%=strToNull(arrayAUnit)%>" onKeypress="return isKeyNumberdot(0)" <
%=edit_flag%> ></td>
<td><input name="BUnit" class="textNoSize" maxlength="4" value="<
%=strToNull(arrayBUnit)%>" onKeypress="return isKeyNumberdot(0)" <
%=edit_flag%> ></td>
<td><input name="CUnit" class="textNoSize" maxlength="4" value="<
%=strToNull(arrayCUnit)%>" onKeypress="return isKeyNumberdot(0)"
onkeydown="if(event.keyCode==13){event.keyCode=9;}" <%=edit_flag%> ></
td>
<td><input name="TUnit" value="<%=strToNull(arrayTUnit)%>"
class="input-dis" disabled></td>
</tr>

This essentially puts three columns of data in x rows. When the
cursor is in, say, column 1, and the TAB key is pressed, I would like
focus to be set to the cell in the next row immediately below the
current row. I tried

onkeydown="if(event.keyCode==9){event.keyCode=11;}"

but this puts the cursor in the browser address bar. My app is
internal use only, only IE supported.

Thanks in advance,
Steve


Add tabindex attributes to your fields. If you're generating the table
dynamically then this will be even easier.

::mrcakey::
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,768
Messages
2,569,574
Members
45,048
Latest member
verona

Latest Threads

Top