Line 64: myVariable is not defined
). For most users, these errors are incomprehensible, and dismissing the dialog box becomes annoying. Only JavaScript developers, testers, and sophisticated users are likely to be interested in the errors.
You can force JavaScript errors to be displayed only in the JavaScript console, which is a window that displays all JavaScript error messages. Then, when a JavaScript error occurs, the error message is directed to the JavaScript console and no dialog box appears. Since the console is normally not displayed, there will be no direct indication to the user that a JavaScript error has occurred. If a user or developer wants to view a JavaScript error, they need only to open the console.
The text of JavaScript error messages appears the same way whether they are displayed in the JavaScript console or in the traditional error dialog box. JavaScript error descriptions are always displayed in English regardless of the locale.
javascript:The following HTML also opens the JavaScript console.
<A HREF="javascript:">Open JavaScript console</A>You cannot open the JavaScript console from the browser menu.
prefs.js
in the following location:
<Netscape path>\Users\<user name>Make sure Navigator is not running when you edit the preferences, or it may overwrite your changes.
user_pref("javascript.console.open_on_error", true);When a JavaScript error occurs, the console opens automatically and scrolls to the error message.
user_pref("javascript.classic.error_alerts", true);
Last Updated: 11/06/98 10:47:39