$.ajax({
type:'POST',
url:'http://mysite.com/url',
data:{fieldname: 'fieldvalue'},
dataType: "json",
success: function(data , status, xhr) {
alert('ajax request successful');
}, fail:function(data){
alert('ajax request failed');
}
});
type:'POST',
url:'http://mysite.com/url',
data:{fieldname: 'fieldvalue'},
dataType: "json",
success: function(data , status, xhr) {
alert('ajax request successful');
}, fail:function(data){
alert('ajax request failed');
}
});