title: onkeypress is not working in form
body: <p>I have the following problem with this code:</p>
  
  <pre><code>&lt;form&gt;
       &lt;div class="searchBarDiv"&gt; &lt;input class="searchBar" id="search" type="search" 
       placeholder="Suche" onkeypress="search();"&gt; &lt;/div&gt;
  &lt;/form&gt;
  </code></pre>
  
  <p><code>search();</code> won't get fired if i press a key. But when i remove the <code>&lt;form&gt;&lt;/form&gt;</code> everything works fine.</p>
  
  <p>Is there any way to fire <code>onkeypress</code> in a form or any other function?</p>
  
  <p>I`m using PhoneGap and jQuery. It won't work in a Browser or on a mobile Device.</p>
  
  <p>Any help would be nice. Thank you in advance!</p>
  
  <p><strong>Edit:</strong>
  Solved by A. Wolff: You can't use the id 'search' in a form. Thank you all for you answers and solutions.</p>