title: JQM (jQueryMobile) Access to URL history?
body: <p>I have a issue with being able to link back to the home page from a AJAX response from a Multi-page layout form submission</p>
  
  <p>The structure</p>
  
  <p><code>index.php</code> has multi-page agreement (<code>index.php#agreement</code>) </p>
  
  <p><code>#agreemen</code>t has a form that is using the default AJAX call for submission to (<code>agreement.php</code>)</p>
  
  <p>From agreement.php I can go back to the last page (<code>#agreement</code>) which is expected but now I wanted to go back to the <code>index.php</code> page. </p>
  
  <p>I can easily put <code>href="index.php"</code> but then the session looses it values.</p>
  
  <p>Is there a way to go back two steps? or access the URL history and point to a specific page without loosing any of the data in the form(s)?</p>
  
  <p>I have binded <code>agreement.php</code> using this code in <code>index.php</code> </p>
  
  <pre><code>$('#agreement_status').live('pageshow',function(event, ui){
      // Button action
      $('#back_home').click(function(){
          window.history.back(); // this goes back one page to index.php#agreement
          window.history.back(-2); // this goes back one page to index.php#agreement
          $.mobile.changePage("#index", "slideup"); // this works but appends the hashtag in the URL which breaks the other functionality 
      });
  });
  </code></pre>
  
  <p>In <code>agreement.php</code> I have this code</p>
  
  <pre><code>&lt;a id="back_home" 
     data-role="button" 
     data-icon="home" 
     data-theme="z" 
     data-inline="true" 
     style="float:right;"&gt;
      Home
  &lt;/a&gt;
  </code></pre>