It looks like somehow your jQuery is returning an XMLHttpRequest object instead of your answer.
If so, you should request its property responseText, for example:
$.ajax({
type: 'POST',
url: '/ajax/watch.php',
data: {'watch':'aukcia', 'id':aukciaID},
complete: function(r){
alert(r.responseText);
}
});
However, if this does not work, you may get a JSON response, and the [object Object]one you see may be your representation of your browser JSON response.
, . , , jQuery JSON, dataType: 'text' :
$.ajax({
type: 'POST',
url: '/ajax/watch.php',
data: {'watch':'aukcia', 'id':aukciaID},
dataType: 'text',
complete: function(data){
alert(data);
}
});
. http://api.jquery.com/jQuery.ajax/