Click to See Complete Forum and Search --> : Problem with TABINDEX


Jills2000
02-04-2004, 05:06 PM
Hi,

I am having a problem setting the TABINDEX order on my form. Even after including the TABINDEX attribute on each element, the tab is skipping all but the last radio button.

Does anyone know why this may be happening? Any help would be much appreciated!!

Thanks in advance,
Jill

****************
* CODE:
****************

<html>
<body>
<!-- FORM PART ONE APPLICANT DETAILS -->
<fieldset>
<table>
<colgroup><col /><col /></colgroup>
<tr>
<th><label for="employeename">Name: </label></th>
<td><input id="employeename" name="employeename" type="text" tabindex="1"/></td>
</tr>
<tr>
<th><label for="employeenumber">Employee Number: </label></th>
<td><input id="employeenumber" name="employeenumber" type="text" tabindex="2"/></td>
</tr>
<tr>
<th><br/>Employee Status:</th>
<td><br/>
<input id="employeestatus" type="radio" name="employeestatus" value="Permanent" tabindex="3" />
<label for="employeestatus">Permanent&nbsp;&nbsp;&nbsp;&nbsp;</label><br/>
<input id="employeestatus" type="radio" name="employeestatus" value="Temp/Contractor" tabindex="4"/>
<label for="employeestatus">Temp/Contractor</label>
<input id="employeestatus" type="radio" name="employeestatus" value="Existing User" tabindex="5"/>
<label for="employeestatus">Existing User</label><br/>
</td>
</tr>
</table>
</fieldset>
</body>
</html>:)

steelersfan88
02-04-2004, 05:57 PM
The radio buttons need the same name to be linked so only one can be selected. Therefore, the tab button will only go through one of them.

When using tab, normally the first radio button will be selected, and pressing tab again will skip the rest.
With SHIFT+tab, normally the last radio is selected and then te reat skipped when pressing it again.

The only thing you could do would be to have them unlinked and onclick function that will check it and uncheck the others.

ray326
02-04-2004, 10:30 PM
Let me guess. You're only testing in IE, right? Looks like IE is buggy in this respect. The NS/Moz browsers work as you expect. IE tabs to the "group" and then forces direction key navigation within the group. Unfortunately it also forces "selection" along with that navigation. You also can't even "fool" it into pure tab navigation by naming each radio button differently, thereby breaking up the group but retaining the visual effect. In that case it just totally breaks down and can only select the first button in the ex-group.

Jills2000
02-04-2004, 11:00 PM
Hi Ray326,

Yes I was only testing in IE (in fact, it only has to run in IE!)

Thanks for letting me know - I thought it might have been something like this. I guess there's not much I can do...

Jill