Sometimes when you are working on a page and want to publish it and you have some JavaScript errors, but you don't have time to debug it, you can put the following code in order to ignore the JavaScript errors:

1: <head>
2: <script language="javascript">
3: function stoperror()
4: {
5: return true
6: }
7: window.onerror=stoperror();
8: </script>
9: </head>
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).