This topic is locked
[SOLVED]

  Barcode Scanning into field

12/14/2012 11:06:43 AM
PHPRunner General questions
D
djm601 author

Hi,
I have a barcode scanner that I'm using to scan into a form. If I scan the barcode into notepad each scan is on a separate line - therefore the carriage return or enter function is working. When I scan into Google the search is also executed.
However, when I scan into a project on phprunner the enter is ignored, I then have to physical press enter on screen with the mouse. The keyboard enter is also ignored.
Can someone point me in the right direction to get this to work? Do I need to add a custom event after record added?
Any help would be much appreciated.
Dave

Sergey Kornilov 12/14/2012

To make your form submitted by ENTER key pressed add the following code to Javascript OnLoad event of Add/Edit pages:

$(document).keyup(function(e) {

if (e.keyCode == 13)

{

$("#saveButton1").trigger('click');

}

});
D
djm601 author 12/17/2012



To make your form submitted by ENTER key pressed add the following code to Javascript OnLoad event of Add/Edit pages:

$(document).keyup(function(e) {

if (e.keyCode == 13)

{

$("#saveButton1").trigger('click');

}

});



Brilliant! Works with the barcode scanner too, thank you so much.