I have an action rendering rabl templates. When I call it in the browser address bar, I see the json response in the browser. But while making AJAX calls, I cant seem to get a success response. It always gets an error.
$.ajax({
type: 'get',
url: '/user/check_user_availibility',
dataType: 'jsonp',
data: {
username: us,
email: em
},
success: function(data){
alert('success');
e.preventDefault();
},
error: function(d,g,f){
alert('error');
}
});