title: Some browsers wont update hidden input when submitting form
body: <p>I have a classifieds website, and in the <strong>index.html</strong> there is a form.
  This forms target is set to an iframe, also in <strong>index.html</strong>.</p>
  
  <pre><code>&lt;form id="main" name="main" action="search.php" target="iframe" method="get"&gt;
  </code></pre>
  
  <p>I use <code>body onload</code> to submit the form when page is loaded:</p>
  
  <pre><code> &lt;body onload='submit_form();'&gt;
  </code></pre>
  
  <p>The results are as I said displayed in the <strong>iframe</strong>, and I use MySql Limit to create paging.
  I display a "next" and "previous" to the user: (all this is displayed inside the iframe, so I call the function on the parent page like below)</p>
  
  <pre><code>&lt;a onclick='window.parent.page_upd(2)'&gt;Page 2&lt;/a&gt;
  
  function page_upd(p){
    document.getElementById('page').value=p;
    document.forms['main'].submit();
  }
  
  &lt;input type="hidden" id="page" value="1"&gt;
  </code></pre>
  
  <p>As you see I set a hidden input inside <strong>index.html</strong> to the <strong>pagenumber</strong> I wish the user to view, then I <strong>submit</strong> the form, and in the action (search.php) I fetch the page and display accordingly:</p>
  
  <pre><code> //search.php
    $page = $_GET['page'];
  </code></pre>
  
  <p>The paging works in all browsers, so going to different pages works.
  But when <strong>actually clicking a search result</strong>, and going to a completely different link (show_ad.php), and the hitting back, the user is taken back to the first page of the search results.</p>
  
  <p>In other words, "<strong>page</strong>" is set to 1 again.
  But not in all browsers, FF and even IE6 "<strong>remembers</strong>" the "page" value and there it is still '2' for example (for the second page), so the form submits showing the second page.</p>
  
  <p>In Chrome and Opera however, page is set to '1'.</p>
  
  <p>Anybody know why the "page" inputs value is set to 1 again when hitting back in browser?</p>
  
  <p>Thanks</p>