Im attempting to set the tab index on all the input elements in a form that is displayed with a jquery dialog. The current behavior is that when the user starts to tab (the first element is set to focus so that is the first in line) they can tab through the all the controls. The issue us that they can continue to tab to the elements behind the dialog.
Is there a way that I can prevent this from happening and ONLY tab through the form elements in the open dialog?
I'm giving you the logic. you can write code accordingly.
On the last element of your form add an event handler to handle key press event.
Inside the handler function you have to return true if key is not TAB otherwise return false.
That means only non-TAB keys will work on that field.
You can google ascii code of tab. you google code to handle key events.
Thank You