Excluding an object from the tabbing order

This example demonstrates how to exclude an object from the default tabbing sequence. In this example, a user would begin in TextField1 and use the Tab button to navigate to TextField2 and then to TextField3. However, the drop-down list object, DropDownList1, is configured to display when the user’s cursor enters TextField2.

In this case, by default, the user’s experience would be to move sequentially in the following order:

To exclude DropDownList1 from the tabbing sequence, you would add the following scripts to the TextField2 object:

Event

Script

enter

// This conditional statement displays DropDownList3 to the user // and sets the focus of the client application to TextField2. if (DropDownList3.presence != "visible") { DropDownList3.presence = "visible"; xfa.host.setFocus(this); }

exit

// This conditional statement tests to see if the user is // pressing the Shift key while pressing the Tab key. If Shift is // held down, then the client application focus returns to // TextField1, otherwise the focus is set to TextField3. The // experience for the user is that DropDownList3 is not a // part of the tabbing order. var isShiftDown = xfa.event.shift; if (isShiftDown) { xfa.host.setFocus(TextField1); } else { xfa.host.setFocus(textField3); }

// Ethnio survey code removed