title: Why document.getElementById for hidden input works in IE but not Chrome?
body: <p>i have a problem with this part of js code not working in Chrome but working in IE.</p>
  
  <p>this is my javascript code :</p>
  
  <pre><code>function submitformWithPage(xpage)
  {
  
    document.getElementById('itempage').value = xpage;
   alert(xpage);
    document.searchForm.submit();
  
  }
  </code></pre>
  
  <p>and this is my html code</p>
  
  <pre><code>&lt;form name="searchForm" action="search.php" method="get"&gt;
  
  &lt;input  type="text" name="search" value="&lt;?php if(isset($_GET['search'])) { echo $_GET['search']; } ?&gt;"/&gt;
  &lt;input type="hidden" name="parameter" value="test" /&gt;
  &lt;input id="item" type="hidden" name="itempage" value="1" /&gt;
  &lt;input type="hidden" name="pageBigForward" value="10" /&gt;
  &lt;input type="hidden" name="pageSmallForward" value="1" /&gt;
  
  &lt;button style="" onclick="javascript: submitform()"&gt;Search&lt;/button&gt;
  
  &lt;/form&gt;
  </code></pre>
  
  <p>I submitted the form by using this code and it works in IE but not in Chorme.</p>
  
  <pre><code>&lt;button style="" onclick="javascript: submitformWithPage(3);"&gt;3&lt;/button&gt;
  </code></pre>
  
  <p>I am lost on how to solve this problem. </p>
  
  <p>Can anyone help me ?</p>
  
  <p>Thanks in advance. </p>