title: Javascript Back Button in Modal - Stop it from closing the modal
body: <p>How do I get the "back" button seen in my demo to NOT close the modal window? </p>
  
  <p>If this can't be prevented, then at least provide them with a confirmation box alerting them the window is trying to close and ask them if they want to continue.</p>
  
  <p>I'm using a javascript back button link and forward button link to control the user's history inside a modal/lightbox window. </p>
  
  <p>Here's a demo of what is happening... When you begin, the second page will have a link to the modal window, so click that, then click the "back" button in the window as it will take you BACK to the start page. That's the issue I'm having as I don't want this to happen.</p>
  
  <p><a href="http://www.apus.edu/_test/evan/modal/start.htm" rel="nofollow noreferrer">http://www.apus.edu/_test/evan/modal/start.htm</a></p>
  
  <pre><code>&lt;a href="javascript:history.go(-1)"&gt;Back Button&lt;/a&gt; 
  &lt;a href="javascript:history.go(1)"&gt;Foward Button&lt;/a&gt;
  </code></pre>