September 07, 2007

Suppress JavaScript Errors on a WebPage

Bellow I am providing a way to suppress to client side scripting errors. Many times you might want to just neglect a javascript error, so just use the code written bellow.


<script language="JavaScript">

function OnErrorSuppress() { return true; }

window.onError = OnErrorSuppress;

</script>

Although I am not in favor of this technique, one should always handle error using Try Catch mechanism.

Labels:

0 Comments:

Post a Comment

Subscribe to Post Comments [Atom]

<< Home