Categories:

Site Search:

Find me at:


Share/Save/Bookmark

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!

Ahmed Moussa said on 28.07.2008. 09:51

you are the Man, you save me alot of time, thanks alot.

Abhishek said on 11.08.2008. 11:54

Really great!!

Hugo Decosta said on 18.09.2008. 12:14

Pretty good! IE kills me with those warnings, some time without reason. Thanks!

savan said on 03.12.2008. 07:09

Really superb,thanks

hamed said on 20.02.2009. 05:30

thanu thanku
thanu thanku
thanu thanku
thanu thanku !!

Laxman said on 08.03.2009. 05:32

Thank you...

Satish said on 01.04.2009. 06:12

great tool. thanks.

denns said on 08.04.2009. 04:56

this actually does not work in IE7... tried and it failed :(

DavidCK said on 19.05.2009. 23:01

THANKS!! Awesome

jtan said on 25.09.2009. 08:22

yo're the man dude, thanks

Kered said on 18.12.2009. 17:24

well I must say this a great.

Well Done !!!!!!

Hermit said on 21.01.2010. 22:01

Thanks!

Lu said on 26.01.2010. 07:32

IE please go away! Until then thanks to people like you.

nithiyalakhsmi said on 26.02.2010. 11:56

Many Thanks! This script gives end to my script problem in ie6.

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

:

:

:


2 + 8 =

Articles RSS feed

Page last (manually) updated: December 23, 2009.