jquery post get error code code example
Example 1: jquery ajax $.post with data
$.post('http://example.com/form.php', {category:'client', type:'premium'}, function(response){
alert("success");
$("#mypar").html(response.amount);
});
Example 2: jquery post failure
$.post("test.php", function(data) {
alert("Data Loaded: " + data);
})
.fail(function() {
alert("error");
})