• Home
  • Map
  • Email: mail@besthelp.duckdns.org

Jquery ajax error message display

to this question' s com/ questions/ 95600/ jquery- error- option- in- ajax- utility) answer. ajax( { / / just showing error property error: function( jqXHR, error, errorThrown). ajaxError( function( e, x, settings, exception) { var message; var statusErrorMap = { ' 400' : " Server understood the request, but request. ajax( { type: " POST", url: " some. php", data: " name= John& location= Boston", success: function( msg) { alert( " Data Saved: " + msg ) ; }, error:. Prior to jQuery 1. 8, the function done was called success and fail was called error. Add a span to your html code for displaying error. < span id= " error" > < / span>. Already you are echoing the message from PHP page to ajax. You can do mysql_ affected_ rows( ) to check whether the query updated the table. Try: error: function( xhr, status, error) { var err = eval( " ( " + xhr. responseText + " ) " ) ; alert( err.

  • Fatal render error has occurred please post your console log
  • Php fatal error unknown failed opening required var www html
  • System error 5 starting service
  • Parse error syntax error unexpected usuario t variable


  • Video:Display jquery ajax

    Error ajax display

    If you' re using jQuery 1. 5, then statusCode will work. 4, try this: error: function( jqXHR, textStatus, errorThrown) { alert( jqXHR. status) ; alert( textStatus) ; alert( errorThrown) ; }. You should see the status code. Although I wouldnt recommend showing the user an error number with the actual response error message this is how you can do this by adding the error callback error: function( xhr, err) { alert( " readyState: " + xhr.