Categories:

Site Search:


Disable Javascript Errors

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>

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.

21.02.2007. 19:08

Chris Cowling said on 05.10.2007. 02:11

Works like a charm, thanks!

Jeff said on 23.01.2008. 20:23

This rocks, thanks!

Tugacari said on 03.05.2008. 23:51

tks dude !

mantosz said on 13.07.2008. 10:43

an instant charm. thanks so much!

Questions, comments, insults or praise? Have your say:

:

:

:


6 + 6 =

Page last (manually) updated: May 01, 2007.