Expand my Community achievements bar.

Prevent execution of Tab key at end of page

Avatar

Level 2

I have a multiple page form, at the end of each page there is "Continue" Button to navigate to the next page, it functions correctly for "Enter" or "Click", but if the tab key is pressed then sometimes the cursor goes to the browser URL area creating problems.  Is there any way to prevent the execution of the Tab Key at the end of a page, or a javascript to add to the Event in the Continue button to prevent Tabbing?

Thanks

2 Replies

Avatar

Level 10

Hi,

The click event of the button probably has a go to next page script. That would work when the user actually clicks it.

You could try a setFocus script for the exit event of the button, which would set the focus to the first object on the next page. This works if the user tabs out of the button without clicking it, then it should fire the exit event.

I am not sure if it will work when the form is viewed in a browser, but it is worth trying.

Good luck,

Niall

Avatar

Level 2

Hello Niall,

Thank you very much for this information. Our application runs in a browser I will give it a try.

I guess the problem is preventing the cursor from going to the URL, There is a risk of loosing all data if customer presses enter inadvertently when the cursor is in the URL (re-launching the application).

DFV