There is a data entry form where you need to enter a URL for something to happen. Form data is sent via Ajax-POST to the PHP handler. The handler itself does not issue an error when switching to it. Here is the Ajax code itself:
function call() { var msg = $('#send').serialize(); $.ajax({ type: 'POST', url: '/oauth/v1/logup', data: msg, success: function(data) { $('#_data').html(data); }, error: function(xhr, str){ alert('Возникла ошибка: ' + xhr.responseCode); } }); } When I send a request from a form, for example, I entered the value of site.ru , then the address is successfully passed to the handler, but if http://site.ru , then an undefined error occurs. What could be the problem?
http://site.rualready an error - Dmitry Frolovconsole.log(xhr);-? - Igor