Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- $.ajax({
- url: '/path/to/file',
- type: 'POST',
- dataType: 'json',
- data: {param1: 'value1'},
- complete: function(xhr, textStatus) {
- doSomethingOnComplete();
- },
- success: function(data, textStatus, xhr) {
- doSomethingOnSuccess();
- },
- error: function(xhr, textStatus, errorThrown) {
- doSomethingOnError();
- }
- });
Add Comment
Please, Sign In to add comment