Y
yawnmoth
Say I have two input elements and that I wanted to make it so that when
the first ones input was what it should be, the focus would
automatically be shifted to the next input element.
ie. something like...
<input onkeyup="if (this.value.length == this.maxlength)
document.forms[0].elements['part2'].focus()" value="whatever"
maxvalue="x" type="text" />
<input value="whatever" maxvalue="x" type="text" />
This, unfortunately, doesn't work for me because, in my case, I have no
way of knowing what the id attribute is going to be. So is there a way
I can change the focus to the next element, whatever that element is?
the first ones input was what it should be, the focus would
automatically be shifted to the next input element.
ie. something like...
<input onkeyup="if (this.value.length == this.maxlength)
document.forms[0].elements['part2'].focus()" value="whatever"
maxvalue="x" type="text" />
<input value="whatever" maxvalue="x" type="text" />
This, unfortunately, doesn't work for me because, in my case, I have no
way of knowing what the id attribute is going to be. So is there a way
I can change the focus to the next element, whatever that element is?