Reputation: 117
this code doesn't work in firefox, in chrome it works and I'm getting results
console.log('send');
$.ajax({
url: my_object.ajax_url,
type: 'POST',
data: {
action: 'sendPhone',
phone: '23342342',
city: 'sddsfsf',
},
beforeSend: function(){
console.log('beforeSend');
},
success: function(msg){
console.log('result = '+msg);
return;
},
});//end $.ajax
output in chrome and this is output in firefox Who knows why $.Ajax doesn't work?
It something weird happening in our forest... :(
Upvotes: 1
Views: 102
Reputation: 7330
Try this: `
console.log('send');
$.ajax({
url: my_object.ajax_url,
type: 'POST',
data: {
action: 'sendPhone',
phone: '23342342',
city: 'sddsfsf',
},
beforeSend: function(){
console.log('beforeSend');
}
})
.success(function(msg){
console.log('result = ' + msg);
});
`
Upvotes: 1