This question is locked. New answers and comments are not allowed.
Hello - I'm working on error handling from controller->browser alert() during a TreeView's AJAX LoadOnDemand event. I'm successfully getting the error into my onError(e) javascript routine.
Controller code...
Here's the javascript code (taken from another post)...
This seems to work fine, except the "loading" icon on the tree node never stops spinning. Is there something in addition to e.preventDefault() I need to do to let the tree know it is not going to get any further response? Ideally, I'd like it to leave the tree node collapsed with the twisty, so the user can try again.
Thanks!
Jeff
Controller code...
catch ( Exception ex ) { Response.StatusCode = 500; return Content( ex.Message ); }Here's the javascript code (taken from another post)...
function onError(e) { if (e.textStatus == 'error') { if (e.XMLHttpRequest.status == "500") { alert("The server was unable to process your request.\n" + e.XMLHttpRequest.responseText); e.preventDefault(); } } }This seems to work fine, except the "loading" icon on the tree node never stops spinning. Is there something in addition to e.preventDefault() I need to do to let the tree know it is not going to get any further response? Ideally, I'd like it to leave the tree node collapsed with the twisty, so the user can try again.
Thanks!
Jeff