Want more features on Pastebin? Sign Up, it's FREE!
Guest

Jquery Php issue..

By: a guest on Feb 1st, 2013  |  syntax: HTML  |  size: 1.63 KB  |  views: 4  |  expires: Never
download  |  raw  |  embed  |  report abuse  |  print
Text below is selected. Please press Ctrl+C to copy to your clipboard. (⌘+C on Mac)
  1. //////JQUERY
  2. $(".buttonClass").click(function(event) {
  3.     event.preventDefault();
  4.     $.post(url, data, function(response) {
  5.         // hide the clicked button
  6.         $(this).hide();
  7.  
  8.         // insert content from the called php function after the button
  9.         $(this).after(response);
  10.     });
  11. });
  12.  
  13.  
  14.  
  15. ///// FORM
  16.  
  17. <form action="intro_confirmation.php" id="create" method="POST">
  18.     <td><center><b> <?php echo $row['name']; ?> </b></center></td><input type="hidden" name="name" value="<?php echo $row['name']; ?>" />
  19.  <td><b><?php echo $row['contact_no']; ?></b></td><input type="hidden" name="contact_no"  value="<?php echo $row['phone']; ?>" />
  20. <td><center><b><?php echo $row['class']; ?> </b></center></td><input type="hidden" name="class" value="<?php echo $row['class']; ?>" />
  21. <td><center><b><?php echo $row['date_of_intro']; ?></b></center></td><input type="hidden" name="date_of_intro" value="<?php echo $row['date_of_intro']; ?>" />
  22. <td><center><b><?php echo $row['parents_name']; ?></b></center></td><input type="hidden" name="parents_name" value="<?php echo $row['parents_name']; ?>" />
  23. <td><center><b><?php echo $row['email']; ?></b></center></td><input type="hidden" name="email" value="<?php echo $row['email']; ?>" />
  24.  <td><center><b><?php echo $row['notes']; ?></b></center></td><input type="hidden" name="notes" value="<?php echo $row['notes']; ?>" />
  25.  <input type="hidden" name="dob" value="<?php echo $row['dob']; ?>" />
  26.   <input type="hidden" name="trial_type" value="<?php echo $row['trial_type']; ?>" />
  27.     <td>
  28.         <button class="buttonClass">Re-Send Confirmation</button></td>
  29.                 </form>
clone this paste RAW Paste Data