A few questions, first with this var line below, 1 works, but I need the second to work, there is a snytax error, because I'm not sure how to write it
var string = 'id='+ id ;
var string = 'id='+ id 'USER=1';
Secondly; This ajax call is below, it sends delete.php to delete the comment, it works, but I would like to add some error handling. Once I add it to the backend, how can I make it show an error in jquery?
$.ajax({
type: "POST",
url: "delete.php",
data: string,
cache: false,
success: function(){
commentContainer.slideUp('slow', function() {$(this).remove();});
$('#load').fadeOut();
}
source
share