title: Cordova Getting values from form using addEventListener
body: <p>Trying to get values from form using addEventListener.</p>
  
  <p>Following is my code:</p>
  
  <pre><code>onDeviceReady: function() {
      app.receivedEvent('deviceready');
      document.write("&lt;form id='submit_search' action='' method='GET'&gt;&lt;input type='text' name='field[s]' placeholder='search'&gt;&lt;button type='submit'&gt;Search&lt;/button&gt;&lt;/form&gt;")
      document.getElementById('submit_search').addEventListener('submit', function(e){
          e.preventDefault;
          process_search(this);
      }, false);   
  },
  
  function process_search(element){
      var search=element.querySelector("input[name='field[s]']").val();
      alert("You searched for"+search);
  }
  </code></pre>
  
  <p>The alert box does not display. Wonder if the preventDefault is working.</p>