title: Inserting to a table without refreshing page
body: <p>I'm trying to inserting data into a table display the results into a different div without refreshing but can't seem to make it work. When i click on the submit button nothing happens, the page just reloads and that its not being sent</p>
  
  <p>HTML AND ASP</p>
  
  <pre><code>&lt;form id="form1" name="form1" method="post" onsubmit=" return Form1_Validator(this)" action="" &gt;
                  &lt;table width="442" border="0" align="left" cellpadding="3" cellspacing="3"&gt;
                    &lt;tr&gt;
                      &lt;td colspan="6" bgcolor="#50B2FF"&gt;&lt;div align="center" class="style4"&gt;&lt;strong&gt;Super 4 Set 1&lt;/strong&gt;&lt;/div&gt;&lt;/td&gt;
                    &lt;/tr&gt;
  &lt;tr&gt;
    &lt;td colspan="6" bgcolor="#B434E7"&gt;&lt;div align="center"&gt;&lt;span class="style4"&gt;&lt;strong&gt;Please its recommended you select one option against each match&lt;/strong&gt;&lt;/span&gt;&lt;/div&gt;&lt;/td&gt;
  &lt;/tr&gt;
                    &lt;% Dim counter
  While ((Repeat1__numRows &lt;&gt; 0) AND (NOT rs_set1.EOF)) 
  
  counter = counter + 1
  
  %&gt;
                     &lt;tr&gt;
                       &lt;td colspan="6" bgcolor="#FF8AFF"&gt;&lt;strong&gt;League:&lt;%=(rs_set1.Fields.Item("leg_type").Value)%&gt;&lt;/strong&gt;&lt;/td&gt;
                       &lt;/tr&gt;
                     &lt;tr&gt;
                  &lt;td width="20" bgcolor="#FFCCFF"&gt;&lt;input type="radio" name="team&lt;%=counter%&gt;" id="team&lt;%=counter%&gt;" value="&lt;%=(rs_set1.Fields.Item("team1").Value)%&gt;" /&gt;&lt;/td&gt;
                  &lt;td width="126" bgcolor="#FFCCFF"&gt;&lt;%=(rs_set1.Fields.Item("team1").Value)%&gt;
                    &lt;input name="super&lt;%=counter%&gt;" type="hidden" id="super&lt;%=counter%&gt;" value="&lt;%=(rs_set1.Fields.Item("game_id").Value)%&gt;" /&gt;
                    &lt;input name="bet_type&lt;%=counter%&gt;" type="hidden" id="bet_type&lt;%=counter%&gt;" value="Super 4" /&gt;&lt;/td&gt;
                  &lt;td width="20" bgcolor="#FFCCFF"&gt;&lt;input type="radio" name="team&lt;%=counter%&gt;" id="team&lt;%=counter%&gt;" value="&lt;%=(rs_set1.Fields.Item("def_stat").Value)%&gt;" /&gt;&lt;/td&gt;
                  &lt;td width="66" bgcolor="#FFCCFF"&gt;&lt;%=(rs_set1.Fields.Item("def_stat").Value)%&gt;&lt;/td&gt;
                  &lt;td width="27" bgcolor="#FFCCFF"&gt;&lt;input type="radio" name="team&lt;%=counter%&gt;" id="team&lt;%=counter%&gt;" value="&lt;%=(rs_set1.Fields.Item("team2").Value)%&gt;" /&gt;&lt;/td&gt;
                  &lt;td width="126" bgcolor="#FFCCFF"&gt;&lt;%=(rs_set1.Fields.Item("team2").Value)%&gt;&lt;/td&gt;
                &lt;/tr&gt;
  
                    &lt;% 
    Repeat1__index=Repeat1__index+1
    Repeat1__numRows=Repeat1__numRows-1
    rs_set1.MoveNext()
  Wend
  %&gt;
  &lt;tr&gt;
                      &lt;td colspan="6" bgcolor="#50B2FF"&gt;&lt;div align="center"&gt;
                        &lt;input type="image" name="imageField" id="imageField" src="../../imgs/buttons/submit.png" /&gt;
                      &lt;/div&gt;&lt;/td&gt;
  &lt;/tr&gt;
  &lt;% If Not rs_set1.EOF Or Not rs_set1.BOF Then %&gt;
    &lt;% If Not rs_set1date.EOF Or Not rs_set1date.BOF Then %&gt;
      &lt;tr&gt;
        &lt;td colspan="6" bgcolor="#FFFFFF"&gt;&lt;div align="center"&gt;&lt;strong&gt; Expires On: &lt;%= DoDateTime((rs_set1date.Fields.Item("super_bet_over").Value), 1, 2057) %&gt;, &lt;%= DoDateTime((rs_set1date.Fields.Item("super_bet_over").Value), 3, 16394) %&gt;&lt;/strong&gt;&lt;/div&gt;&lt;/td&gt;
      &lt;/tr&gt;
      &lt;% End If ' end Not rs_set1date.EOF Or NOT rs_set1date.BOF %&gt;
    &lt;% End If ' end Not rs_set1.EOF Or NOT rs_set1.BOF %&gt;
                  &lt;/table&gt;
                  &lt;div align="center"&gt;&lt;/div&gt;
                  &lt;/form&gt;
  </code></pre>
  
  <p>jquery</p>
  
  <pre><code>&lt;script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.3.0/jquery.min.js"&gt;&lt;/script&gt;
  
                  &lt;script language="javascript"&gt;
  
  $('form').submit(function(e){
      e.preventDefault();
      var mm = {a:1000, b:1000, c:1000};
      $.ajax({
          url:"super4_engine.asp",
          data:mm,
          type:"POST",
          success:function(data){
  
          }
      });
  });     
                  &lt;/script&gt;
  </code></pre>