ajax - Trap message/exception in jquery to ELMAH -
in mvc3 application, returning messages stored procs. if 'successful', i'm moving forward else displaying custom error page. when message else, want trap in elmah. problem facing return message not error i'm not able figure out how handle it. still want display custom error page after catching error in elmah. please help.
$.ajax({         url: "../xyz",         type: 'post',         datatype: 'text',         async: false,         data: json.stringify({ abcdata: abcdata, strdeb: strdeb, strcre: strcre }),         contenttype: 'application/json; charset=utf-8',         success: function (data) {             if (logout != "logout") {                 if (data.tolowercase() != "successful") {                     **//alert(data.tostring());                     window.location.href = "../error";**                 } else {                     window.location.href = "../abc";                 }             }         },         error: function () {             var sessionwindowelement = $('#sessionlayoutlogoutwindow');             sessionwindowelement.data('twindow').center().open();         }     });  
 
Comments
Post a Comment