Within the application's navigation bar, there is a Home item that is present on all pages. I want to implement a feature where if the user clicks on the Home item, a warning message will pop up based on the page number, alerting them that any unsaved work will be lost. If the user selects 'yes', they will be directed to the application's home page without any work being saved. If they choose 'no', they will remain on the current page.
Currently, the warning dialog appears on every page. In Oracle Application Express, under
shared components > navigation bar > target area
, here are my settings:
Target type = url
URL target =
javascript:if(confirm('All unsaved work will be lost?'))
{window.location.href ='f?p=&APP_ID.:1:&SESSION.:&APP_PAGE_ID.';}
I want this functionality to be limited to specific pages. If a user clicks on a page that is not on the designated list, the warning message should not appear and they will be directed to the application's home page.