0
This simple script will prevent javascript errors from being displayed in your visitor's browser
<script type="text/javascript">
function noError(){return true;}
window.onerror = noError;
</script>
Or jQuery:
$(window).error(function(){
return true;
});
The functionality is very simple: create a function that always returns true, and then whenever an error occurs, call this function (returning true and suppressing the error).
Shamefully, this script is only tested in IE.
Labels:
Javascript,
jQuery
Loading related posts...
Javascript,jQuery
10/23/2010 09:33:00 AM
Subscribe to:
Post Comments (Atom)