How does SetFocusID work?


Hi Guys,

I am working on a project and would like to have it go to a specific input when opening the form. I think SetFocusID should do that, but I am not able to get it to work that way.

I would also like it to go to the next form if someone fills in the input field and presses enter. Is that possible?



The function to set the focus to a control is focus, as in


Going to the next form if someone hits return may not be want you want. If the user is on a mobile device, they won’t be hitting return (or tab) to go to the next field. They’ll just tap on the next field. Instead, you could check if they are leaving the field: (aircode in BASIC)

Function Input1_onblur()
End Function


Input1.onblur = function() {


Hi George,

In this case, I have put the input1.focus() in the code for the form, and that didn’t provide focus there (testing using Chrome and IE on my laptop).

In my case, I am asking for an ‘order number’ and then I want it to go to the next page when someone hits enter or I can do the onblur since that is useful as well. But this will be running most likely on IE on a Zebra scanner. So I want them to be able to punch in the order number and then go to the next form.

From there, I am going to use a keyboard ‘wedge’ to scan in a long barcode, and that will press enter at the end, but I might be able to have it ‘onblur’ and send a tab after the read of the barcode. I will then have a ‘finish’ button as they will be scanning between 1 and 1000 items that are attached to that order on the first screen.

On the ‘finish’ the intention is to ajax it to put that data into the database, and then return to the ask for an order screen so I can start this process again.



I am also doing this in 7.0.2.