How to avoid focus issue while navigating via Browser Back button
658330May 5 2009 — edited May 5 2009Hi
I'm facing some problem in setting focus on Buttons.
Please refer application: http://apex.oracle.com/pls/otn/f?p=47869:2
login credentials:
Workspace: vsanthanam
user: vijay
pswd: apex_demo
In this application, i have 2 pages.
Page#2 has Submit button
Page#3 has Cancel button
Both buttons are HTML based and can be accessed using access Key ALT + s and ALT + c.
The problem is:
When i go back to previous page (pgid#2) of the application using IE Browser's Back Button from pgid#3,
because of onFocus event set in Submit button, control comes back to pgid#3.
Is there any possible way to set the focus to other items. so that whenever IE brower back button pressed, application would remain in
page#2.
Approaches i took:
-------------------------
If we use onclick, instead of onfocus then again the problem remains since we have to have onfocus = "this.click();" to incorporate Accesskey features.
Another way is onKeyup event. if we use onKeyup, we can avoid this browser back issue, but vanishes access key features.
Any pointers on this would be of great help.
Many Thanks
--Vijay
Please NOTE: I intentionally created two buttons in each page. This is required to have HTML buttons with access key features,
otherwise application gives some flaws in HTML-accesskey.