Delete records as per check boxes 'checked' works but cannot refresh the page at the end

Delete records as per check boxes 'checked' works but cannot refresh the page at the end

Dear All

I had written a jquery that will select multiple records and delete them
The JQUERY 
  • Deletes the selected records (records whose check boxes are checked)
But,  refreshes the page after deleting each record which is 
I want to 
  1. Refreshes the page only after deleting all 'selected' records ->at present  refreshing the page after deleting each records I amusing following code to refreshing the page
  2.  location.reload(); // refreshes the page
  3. If possible display the list of records deleted in a DIV  . 

Please help

JQUERY to delete selected records one by one

  1.  <script   language="javascript">
  2. $(document).ready(function() {
  3.  
  4.     $('#selectall').click(function(event) {  
  5.          if(this.checked) { // check select status
  6.             $('.checkbox1').each(function() { //loop through each checkbox
  7.                 this.checked = true;  //select all checkboxes with class "checkbox1"               
  8.             });
  9.         }else{
  10.             $('.checkbox1').each(function() { //loop through each checkbox
  11.                 this.checked = false; //deselect all checkboxes with class "checkbox1"
  12.             });         
  13.         }
  14.     });

  15. $('#groupdelete').click(function(){
  16.      var noofcheckbox=$("input[type=checkbox]:checked").length;  
  17. //alert( noofcheckbox);
  18.    
  19.             var checkValues = $('input[name=checkboxlist]:checked').map(function()
  20.             {
  21. //alert($(this).val());
  22.                 var chekboxid=$(this).val().split('checkbox');
  23. //alert(chekboxid[1]);
  24.    var url = "deleteselectedrecord.php"
  25.    var data = { 
  26. id: chekboxid[1]
  27.   };
  28.   $('#deleteid').val(chekboxid[1]);
  29.   $('#deleteselectedrecorddiv').load(url, data,abcd);               // return $(this).val();
  30.             }).get() 
  31.   });

  32. function abcd () {
  33.  
  34.  location.reload(); // refreshes the page
  35.  }

  36. });
  37. </script>
PHP Code

  1. session_start();
  2. include("../includes/dbconnect.php");
  3. include_once("../includes/functions.inc.php");
  4. include_once("../includes/config.inc.php");
  5.  

  6.  
  7. $id=$_REQUEST['id'];
  8. $dquery=sprintf("delete from enquiry where id=%d",$id);
  9.  
  10. mysql_select_db($database_DBconnect, $DBconnect);
  11. $vsResult = mysql_query($dquery, $DBconnect) or die(mysql_error());
  12. if ($vsResult )
  13. { echo '<br>Deleted '.$id;  /// I can see only last ID
  14. }
  15.  ?>