KnowledgeHub
Questions
Tags
Users
Search
Alex Rivera
|
Logout
Edit Question
Title
Body
As soon as the user clicks the delete button my jQuery script asks the server to delete the selected item. Now I want my php script to send a success or an error response. Is it possible to fire the error callback in case the item could not be deleted? Thanks my jQuery code: $.ajax({ type: "post", url: "myAjax.php" , dataType: "text", data: { some:data }, error: function(request,error) { // tell the user why he couldn't delete the item // timeout , item not found ... }, success: function ( response ) { // tell the user that the item was deleted // hide the item } );
Tags (comma-separated)
Save Edits
Cancel