angiras
10-27-2003, 08:42 AM
this code works only with tabindex = 1,2,3
--------------------------------------------------
<script type="text/javascript">
function toUnicode(elmnt,content)
{
if (content.length==elmnt.maxLength)
{
next=elmnt.tabIndex
if (next<document.forms[0].elements.length)
{
document.forms[0].elements[next].focus()
}
}
}
</script>
<input size="2" tabindex="1" id="one"
maxlength="2" onkeyup="toUnicode(this,this.value)" />
<input size="2" tabindex="2" id="two"
maxlength="2" onkeyup="toUnicode(this,this.value)" />
<input size="2" tabindex="3" id="three"
maxlength="2" onkeyup="toUnicode(this,this.value)" />
-----------------------------------
if I use tabindex = 100,101,102 it doesn't work
--------------------------------------------------
<script type="text/javascript">
function toUnicode(elmnt,content)
{
if (content.length==elmnt.maxLength)
{
next=elmnt.tabIndex
if (next<document.forms[0].elements.length)
{
document.forms[0].elements[next].focus()
}
}
}
</script>
<input size="2" tabindex="1" id="one"
maxlength="2" onkeyup="toUnicode(this,this.value)" />
<input size="2" tabindex="2" id="two"
maxlength="2" onkeyup="toUnicode(this,this.value)" />
<input size="2" tabindex="3" id="three"
maxlength="2" onkeyup="toUnicode(this,this.value)" />
-----------------------------------
if I use tabindex = 100,101,102 it doesn't work