title: jQuery to call on modal page in Apex Oracle verison
body: <p>Can someone help with jquery in Apex Oracle? I want to call on a modal page in Apex when a text or change has been made to a page and the user tries to navigate away before saving. </p>
  
  <p>It's similar to the onbeforeunload here, except I want it to call on a modal page I create instead of using a Window's window. </p>
  
  <pre><code>$(document).ready(function() {
    formmodified=0;
      $('form *').change(function(){
          formmodified=1;
      });
    window.onbeforeunload = confirmExit;
      function confirmExit() {
        if (formmodified == 1) {
            return "New information not saved. Do you wish to leave the page?";
        }
    }
  });
  </code></pre>