title: getting form variables with JavaScript
body: <p>I have the following form(echoed through php), which when a radio button is selected, I want that value to be passed to a javascript function, which I can then deal with.</p>
  
  <pre><code>&lt;form id=\"form1\" name=\"form1\" method=\"\" action=\"JavaScript:alterRecord()\"&gt;
  &lt;input name=\"radiobutton\" type=\"radio\" value=\"test1\" /&gt;Test 2&lt;p&gt;
  &lt;input name=\"radiobutton\" type=\"radio\" value=\"test2\" /&gt;Test 2&lt;p&gt;
  &lt;input name=\"radiobutton\" type=\"radio\" value=\"test3\" /&gt;Test 3&lt;p&gt;
  &lt;input name=\"radiobutton\" type=\"radio\" value=\"test4\" /&gt;Test 4
  &lt;input type=\"submit\" name=\"Submit\" value=\"Submit\" /&gt;
  &lt;/form&gt;
  </code></pre>
  
  <p>And the JavaScript</p>
  
  <pre><code>function alterRecord(value) {
  alert(value);
  }
  </code></pre>
  
  <p>I can not find out how to get the javascript to obtain the form submitted value.</p>