First of all, download the following file.
Support Anime Theme to provide MORE scripts! Thanks!
Open your own HTML document and add the following lines before the BODY tag.
<script language="JavaScript1.2">
<!--
var err_email = "xxx@xxx.com"
var err_max = 1
var err_excludes = new Array()
//-->
</script>
<script language="JavaScript1.2" src="error.js"></script>
Change the value of err_email (xxx@xxx.com) to your own email address.
err_max is the maximum number of errors captured so that the error info can be included in the bug report. After the number of errors has exceeded this number, all other errors will simply be ignored. If you set this value as 0 or smaller, all errors will be captured for reporting.
In some cases you may want to ignore some script errors for reporting. If so you can change err_excludes in this way.
var err_excludes = new Array("err0", "err1", ..., "errN")
Where
- errN is a series of strings representing the error messages to be ignored. They should be in lower-case.
Example:
var err_excludes = new Array("unknown", "properties")
In this example, errors like "Unknow runtime error", "ObjX has no properties" will be ignored. Note that cases of the error messages are ignored. The excluded errors will never be captured for reporting nor will they appear as error popup windows.
You can take a look at "example.html" included for a complete example.
After all the works, upload your HTML document as well as "error.js" to your web server.
Return to Dynamic HTML Resource Center