PDA

View Full Version : Tab press should stay in the same form



rakesh.h
23 Jun 2014, 11:17 PM
Hi,

I have a form with controls. On pressing tab key, focus on controls change, focus will also shift to browser url address bar. I want tab press should focus only in the form itself.

Please help me.

Thanks & regards
Rakesh

evant
24 Jun 2014, 4:12 PM
You'd need to capture the tab key press on the last field, stop the event and then focus the first field. You'd also need to do the same on the first field so you could shift + tab back to the last.

rakesh.h
24 Jun 2014, 10:00 PM
Hi evant,

Thanks for the reply. If the last field is button how can i capture tab key press. Button does not have key press event.

Thanks & regards
Rakesh

rakesh.h
30 Jun 2014, 3:00 AM
Hi,

I got the solution. I gave the tabIndex from 1 (for first element) to 'n' (for 'n'th element). In the 'n'th element using 'blur' event focus to first element.

Thanks & regards
Rakesh