I think the issue is that the button action is defined as "Redirect to Page in this Application", but it should always be "Defined by Dynamic Action" as soon as you have defined "click" dynamic actions for a button. Normally that's automatically changed as soon as you create your first dynamic action for a button, and I just confirmed it by creating a test button in your app which was defined as "Redirect ...". After I created a dynamic action the button action was set to "Defined by Dynamic Action".
Is it possible that you changed the button action back to "Redirect..."? The issue why "Redirect..." will not work is that we can't guarantee in which order the browser will process click events defined with onclick at the button tag itself and those click events attached as event handlers. That's why it's necessary that everything is defined as dynamic actions. Only in that case you will be able to cancel the processing.
Member of the APEX development team
My Blog: http://www.inside-oracle-apex.com
APEX Plug-Ins: http://apex.oracle.com/plugins
Message was edited by: Patrick Wolf
Yes, that's it. I have modified the demo page mentioned above and it now works. The button action is now set to "Defined by Dynamic Action", and the dynamic action has two true actions:
- Confirm - "Are you sure?"
- Submit page - request=CANCEL
I then added a branch conditional on request=CANCEL to redirect to the other page.