1

Hello, does anyone know a simple way to focus on a different text field after the user enters data in the first text field? Thanks.

2
Contributors
4
Replies
5
Views
6 Years
Discussion Span
Last Post by brynFlew
0

I was able to accomplish this using

<script>
function check()
{
var letters = document.inputData.swipeCard.value.length +1;
if (letters <= 6)
{document.inputData.swipeCard.focus()}
else
{document.inputData.workArea.focus()}
}

function check2()
{
var letters2 = document.inputData.workArea.value.length +1;
if (letters2 < 1)
{document.inputData.workArea.focus()}
else
{document.inputData.partNumber.focus()}
}

function check3()
{
var letters3 = document.inputData.partNumber.value.length +1;
if (letters3 <= 4)
{document.inputData.partNumber.focus()}
else
{document.inputData.quantity.focus()}
}

  </script>

and

onKeyUp="check()"
onKeyUp="check2()" ..
0

now if only i knew how to change the field depending if the field is null or not because i am using a barcode scanner and want to auto tab after every scan, i cannot seem to get this part working, any advice?

0

ive tried that unfortunately the onchange only seems to work when i click outside the input field, ive tried all the js tags cant seem to get any to work.

This question has already been answered. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.