title: Trying to add variable value from an html form into javascript
body: <p>I've got a form set up below which has two inputs Keywords and min price</p>
  
  <pre><code>&lt;form name="Data" method="GET" action="#"&gt;
  &lt;table cellpadding="2" border="0"&gt;
    &lt;tr&gt;
      &lt;th&gt;Keywords&lt;/th&gt;
      &lt;th&gt;Min Price&lt;/th&gt;
    &lt;/tr&gt;
    &lt;tr&gt;
      &lt;td&gt;&lt;input type="text" name="keywords" id="keywords"/&gt;&lt;/td&gt;
  
      &lt;td&gt;&lt;input type="text" name="MinPrice" id="MinPrice"/&gt;&lt;/td&gt;
  
    &lt;/tr&gt;
    &lt;tr&gt;
      &lt;td colspan="2" align="center"&gt;&lt;INPUT type="submit" name="submit" value="Search"&gt;
      &lt;/td&gt;
    &lt;/tr&gt;
  &lt;/table&gt;
  &lt;/form&gt;
  </code></pre>
  
  <p>Then the results obtained need to go into a javascript that then should return result based on the variable. The JS works without the variable i.e. just putting them in in the code, but i can t figure out how to reference the above form then submit the code as a whole</p>
  
  <pre><code>      html.push('&lt;/tbody&gt;&lt;/table&gt;');
    document.getElementById("results").innerHTML = html.join("");
  }  
  var filterarray = [
    {"name":"MaxPrice",
     "value":"1000",
      "name":"MinPrice",
     "value":Variable here!!,
     "paramName":"Currency",
     "paramValue":"GBP"},
  </code></pre>
  
  <p>Above is part of the script where one of the values would go</p>
  
  <p>Any help apreciated p.s. complete novice so take it very slowly</p>