Home Articles FAQs XREF Games Software Instant Books BBS About FOLDOC RFCs Feedback Sitemap
irt.Org
#

Q1573 Is there a way to control the tab-sequence in a form in both Internet Explorer and Netscape Navigator using an array?

You are here: irt.org | FAQ | JavaScript | Form | Q1573 [ previous next ]

Try:

<script language="JavaScript"><!--
var c = 0;
var elementOrder = new Array(1,2,5,4,7,8,3,6); // must have one less number than form elements.
//--></script>

<form name="myForm">
<input type="text" onBlur="c++; setTimeout('document.myForm.elements['+c+'].focus()',1)">
<input type="text" onBlur="c++; setTimeout('document.myForm.elements['+c+'].focus()',1)">
<input type="text" onBlur="c++; setTimeout('document.myForm.elements['+c+'].focus()',1)">
<input type="text" onBlur="c++; setTimeout('document.myForm.elements['+c+'].focus()',1)">
<input type="text" onBlur="c++; setTimeout('document.myForm.elements['+c+'].focus()',1)">
<input type="text" onBlur="c++; setTimeout('document.myForm.elements['+c+'].focus()',1)">
<input type="text" onBlur="c++; setTimeout('document.myForm.elements['+c+'].focus()',1)">
<input type="text" onBlur="c++; setTimeout('document.myForm.elements['+c+'].focus()',1)">
<input type="text" onBlur="c++; setTimeout('document.myForm.elements['+c+'].focus()',1)">
</form>

©2018 Martin Webb