Saturday, May 25, 2013

Question: Can I suppress JavaScript error messages?

Question: Can I suppress JavaScript error messages?

Answer: Yes. To suppress all JavaScript error messages on your HTML page, you can put the following code fragment in the HEAD section of your page:

<SCRIPT language="JavaScript">
<!--
function silentErrorHandler() {return true}
window.onerror=silentErrorHandler()
//-->
</SCRIPT>

No comments:

Post a Comment