title: javascript form - bypassing default behaviour for ajax
body: <p>I am trying to use the following code below. What I want is to get the value of which radio button is selected, sent back to the javascript method. Any variation I try seems to fail.</p>
  
  <pre><code>&lt;html&gt;
    &lt;head&gt;
      &lt;style type="text/css"&gt;
        body { background-color: black; color: white; }
      &lt;/style&gt;
      &lt;script type="text/javascript"&gt;
        function handleClick(event)
        {
  
          alert(this.textBox1.value);
  
          event.preventDefault(); // disable normal form submit behavior
          return false; // prevent further bubbling of event
        }
  
      &lt;/script&gt;
    &lt;/head&gt;
    &lt;body"&gt;
      &lt;form name="myform"&gt;
        &lt;div&gt;
   &lt;input type="radio" name="test1" value="Cheese"&gt;
   &lt;input type="radio" name="test2" value="Grapes"&gt;
   &lt;input type="radio" name="test3" value="Crackers"&gt;
        &lt;/div&gt;
        &lt;input type="submit" onsubmit=JavaScript:handleClick(value) value="Update"/&gt;
      &lt;/form&gt;
    &lt;/body&gt;
  &lt;/html&gt;
  </code></pre>