Want to protect your cyber security and still get fast solutions? Ask a secure question today.Go Premium

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 1205
  • Last Modified:

Emulate an Enter or Tab Key when Scanning a barcode in JAVASCRIPT

I have a number of textboxes lined up and would accept values from a scanned barcode. Is there a way to emulate 'hitting the tab key or enter key' when I scan a barcode so it goes directly to the next textbox????

Thanks
0
ranniedv
Asked:
ranniedv
1 Solution
 
The_ChiefGeekCommented:
if you know the form component that you want to have focus when the barcode scan occurs then this should do it.
function makeFocus()
{
    var x=document.forms.myForm
    x[0].focus()
}
0
 
ranniedvAuthor Commented:
thanks! what will trigger this function? An OnChange?
0

Featured Post

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Tackle projects and never again get stuck behind a technical roadblock.
Join Now