Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

{"readyState":0,"status":0,"statusText":"NetworkError: Failed to execute 'send' on 'XMLHttpRequest': Failed to load

Error message is

{"readyState":0,"status":0,"statusText":"NetworkError: Failed to execute 'send' on 'XMLHttpRequest': Failed to load...

When the following is executed

$.ajax({
      url: "http://swingd.achievedigital.com/action/user_signin.php",
      dataType: 'json',
      crossDomain: true,
      method: 'POST',
      async: false,
      data: pstr,
      success: function(data) 

Changing

Async: false to true

causes this error:

{"readyState":0,"responseText":"","status":0,"statusText":"error"}--"error"--""

Anyone have any suggestions? Anything would be greatly appreciated.

like image 409
John English Avatar asked Jul 20 '26 06:07

John English


1 Answers

Usually, a response of 0 means that the request was not even allowed to reach the server (or the server did not support CORS).

  • Cross domain problems (does http://swingd.achievedigital.com/action/user_signin.php have CORS enabled?)
  • If the request is cancelled by the client (say if the page navigates away, or you call abort on the XHR)

See XMLHttpRequest status 0 (responseText is empty)

like image 85
Juan Mendes Avatar answered Jul 21 '26 19:07

Juan Mendes



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!