Open AJAX error response in a new window
Ever get annoyed when inspecting errors returned from your failed AJAX calls? I do. This following function will open up the response in a new window.
function popUpError(err) {
var output = err.responseText;
var openWindow = window.open("errorDetails.html", "mywin", '');
openWindow.dataFromParent = output;
openWindow.init();
}
Probably not one to leave in when your code goes to production but it can speed things up a little during the development process.
Written by Macs Dickinson
Related protips
Have a fresh tip? Share with Coderwall community!
Post
Post a tip
Best
#Ajax
Authors
Sponsored by #native_company# — Learn More
#native_title#
#native_desc#