How to handel error in ajax?



How to handel error in ajax?..

Answer / Man Mohan

{"handling": "To handle errors in AJAX requests, you can use the 'error' callback function or promise rejection. This function will be called when an error occurs during the request (such as network errors or server-side issues).", "example": "Example: $.ajax({...}).fail(function(jqXHR, textStatus, errorThrown) { console.log('Error occurred: ' + textStatus); });""}

Is This Answer Correct ?    0 Yes 0 No

Post New Answer

More AJAX Interview Questions

What is the difference between javascript and ajax?

1 Answers  


Can ajax be implemented in browsers that do not support the xmlhttprequest object?

1 Answers  


Explain differences between the page execution lifecycle of an asp.net page and an asp.net ajax page?

1 Answers  


What are the common problems (errors) you get while implementing AJAX?

1 Answers   Hoch Technologies,


What is use of Update Panel control in Ajax toolkit?

1 Answers   Viscus Infotech,


How to control the duration of an Ajax request?

1 Answers  


What technologies are being used in ajax? : asp.net ajax

1 Answers  


How we can send more values through the response text?

1 Answers  


whether QTP sopports the ajax application

1 Answers   Wipro,


What does the minimumprefixlength property of the autocompleteextender control do? : asp.net ajax

1 Answers  


Which two methods are used for handling cross-domain ajax calls ?

1 Answers  


Can I use ajax with seam?

1 Answers  


Categories