title: Conditional actions when an Oracle APEX navigation bar item is click
body: <p>The application has a Home item in the navigation bar (the item is in all the pages). I would like that when the home item is clicked, based upon the page number a warning box is shown to the user warning them, that all unsaved work will be lost. If the user presses yes, he or she will be taken to the application home page and nothing will be saved. If they press no, he or she will stay in the page. </p>
  
  <p>Currently this dialog box shows up in every page. In Oracle Application Express, <code>shared components &gt; navigation bar &gt; target area</code>,  these are my settings:</p>
  
  <p>Target type = <code>url</code> </p>
  
  <p>URL target = </p>
  
  <pre><code>javascript:if(confirm('All unsaved work will be lost?')) 
  {window.location.href ='f?p=&amp;APP_ID.:1:&amp;SESSION.:&amp;APP_PAGE_ID.';}
  </code></pre>
  
  <p>I would like this behavior to only occur in a select number of pages. When a user clicks on the pages not included in this list, the warning box should not be shown and the user is taken to the application home page. </p>