title: Get parameter from the form
body: <p>In phonegap, I uses one jquery mobile framework. And I want to pass the form data to next page which is a div by using page url. I tries to use GetElementByID to retrieve the parameter. It shows me "[object HTMLDivElement]". I is not the result I wanted. How can I solve it?</p>
  
  <p>Down below is the function that change to next page DIV is the code of my phonegap:</p>
  
  <pre><code>&lt;script type="text/javascript"&gt;
  $('#home').live('pagecreate',function(event) { 
      $("#form").submit( function (e) {
              e.preventDefault();
              var x=document.getElementById("search");
              $.mobile.changePage("#page1?param1="+x);
      });
  });
  &lt;/script&gt;
  </code></pre>
  
  <p>And the form html:</p>
  
  <pre><code>&lt;form id="form" method="POST" action="page1" data-ajax="false"&gt;
                  &lt;div data-role="fieldcontain" id="search"&gt;
                      &lt;fieldset data-role="controlgroup"&gt;
                          &lt;label for="search"&gt;
                              Search
                          &lt;/label&gt;
                          &lt;input name="search" id="search" placeholder="" value="" type="search" /&gt;
                      &lt;/fieldset&gt;
                  &lt;/div&gt;
                  &lt;div data-role="fieldcontain" id="searchmethod"&gt;
                      &lt;label for="searchmethod"&gt;
                      &lt;/label&gt;
                      &lt;select id="searchmethod" name="searchmethod" data-theme="e"&gt;
                          &lt;option value="keyword"&gt;
                              Keyword
                          &lt;/option&gt;
                      &lt;/select&gt;
                  &lt;/div&gt;
                  &lt;div data-role="fieldcontain" id="searchlocation"&gt;
                      &lt;label for="searchlocation"&gt;
                      &lt;/label&gt;
                      &lt;select name="searchlocation" data-theme="e"&gt;
                          &lt;option value="Entire Collection"&gt;
                              Entire Collection
                          &lt;/option&gt;
                      &lt;/select&gt;
                  &lt;/div&gt;
                  &lt;input type="submit" value="Submit" /&gt;
              &lt;/form&gt;
  </code></pre>