$(window).error(function(msg, url, line){ jQuery.post("/js_error_log.ashx", { msg: msg, url: url, line: line });});