The following example that's given in the Event/error page at (http:// docs.jquery.com/Events/error) does not work. Based on my understand of the example, this is supposed to bind the function to the browsers "onerror" function and pass the msg, url, and line. Instead of doing this, it just passes the DOM eventObject in the msg variable.
$(window).error(function(msg, url, line){ jQuery.post("js_error_log.php", { msg: msg, url: url, line: line }); });