overview.php

mail@pastecode.io avatar
unknown
jsp
2 years ago
1.0 kB
12
Indexable
Never
<script type="text/javascript">
$(function(){
  $(".delete").click(function(){
      swal({   
          title: "Slet venneanmodninger",   
          text: "Vil du slette de valgte venneanmodninger ?",   
          type: "warning",   
          showCancelButton: true,   
          confirmButtonColor: "#DD6B55",   
          confirmButtonText: "Yes, delete it!",   
          closeOnConfirm: false 
      }).then(isConfirmed => { 
        if(isConfirmed) {
          $.ajax({   
   type: "POST",
   url: "pages/users/friends/awaiting/del.php?receiverid=<?php print $usID; ?>&senderid=<?php print $id; ?>",
   success: function(){
   $('#colorbox').html("<div class='boxwindow'><div id='colorbox' class='colorbox2'><i style='font-size: 50px;' class='fas fa-trash-alt'></i><br />De valgte venneanmodninger slettes ...</div></div>");
				 setTimeout( function() { 
					window.location.href = "brugere/profil/<?php print $UsersID; ?>/venner/afventer/"; 
				  }, 3000);
   }
 });

}
        });
  });
});
</script>