Categories:

Home / Free JavaScripts / Other / Here

Cut & Paste Custom JavaScript error box

Credit: JavaScript Kit

Description: Don't you just hate the default, intrusive JavaScript error message box that pops up when the browser runs into a scripting error? Why not replace it something less annoying? This script when added to the HEAD section of your page, will detect any JavaScript errors, and if they are found, suppress that error and instead displaying a notice in the browser's status bar.

Example:

This page contains a JavaScript error. Look at your status bar below. The error script is:

<script>
alert("fdfdf" <-- (No closing parenthesis)
</script>

Directions: Insert the below in the <head> section of your page, as the VERY first script:

You can change the dimensions, text, and background color of the error box simply by editing the HTML codes inside the script.


JavaScript Tools:
Site Info


CopyRight (c) 2018 JavaScript Kit. NO PART may be reproduced without author's permission. Contact Info