Time for a little fun. In this closing section, lets see how to create a custom error boxe that replace the default one in the event of a js error. This box, unlike the default box, pops up only once, even if there are multiple errors on the page:
Click here to for an actual demo of this simple custom error dialog.
If you're more ambitious, you can actually create a custom error box that, when closed, sends the information regarding the errors (error message, line number etc) to you, providing you with an easy way to debug your scripts with the help of your surfers. The idea is to store all the error information into an array, and connect the form button inside the error window to your usual form submission script, so all the error info is submitted to you when the error box is closed.