spacer

Webref WebRef   Sitemap · Experts · Tools · Services · Newsletters · About i.com

home / experts / javascript / column26


JavaScript Console

Developer News
Google to Shake Up Browsers With Own Launch
Mozilla's Ubquity Mashup: For The Masses?
iPhone Users Just Want to Have Fun

Netscape Navigator 4.06 and 4.5 changed the behavior of the JavaScript console. In previous versions, when you type javascript: in the URL field, your window transforms into a JavaScript console. The output of the JavaScript console is printed in this window while errors are printed in an alert box, one box per error. In Navigator 4.06 and 4.5, when you type javascript: in the URL field, a new window pops up with a javascript typein entry box, and buttons to clear the console and close it.

The dialog window in earlier versions became annoying to most people, especially for those users who did not find the messages that helpful. In Navigator 4.06 and 4.5, you can direct the HTML page errors to the JavaScript console. Since the console is normally hidden, errors are hidden as well from the user, unless he or she opens the console. You can set a preference to automatically open the console when a JavaScript error occurs. The error message is the same, whether it is displayed in a popup window or the JavaScript console, and looks like:

JavaScript Error: file:/D|/Yehuda/Column26/code7.html, line 11:

syntax error. 

c <> b.length;
...^

Currently, JavaScript errors are printed in English. International versions will be supported in the future.

You can set the JavaScript console's preferences in the JavaScript preference file, prefs.js, under <Netscape Path>\Users\<user name>. Automating the opening of the JavaScript console can be done by inserting the following line to the above file:

user_pref("javascript.console.open_on_error", true);

You can revert back to the dialog box for error display, by inserting the following line in the JavaScript preference file:

user_pref("javascript.classic.error_alerts", true);

http://www.internet.com



JupiterOnlineMedia

internet.comearthweb.comDevx.commediabistro.comGraphics.com

Search:

Jupitermedia Corporation has two divisions: Jupiterimages and JupiterOnlineMedia

Jupitermedia Corporate Info


Legal Notices, Licensing, Reprints, & Permissions, Privacy Policy.

Advertise | Newsletters | Tech Jobs | Shopping | E-mail Offers

Solutions
Whitepapers and eBooks
Intel PDF: Virtualization Delivers Data Center Efficiency
Intel eBook: Managing the Evolving Data Center
Microsoft Article: BitLocker Brings Encryption to Windows Server 2008
Symantec eBook: The Guide to E-Mail Archiving and Management
Microsoft Article: RODCs Transform Branch Office Security
Go Parallel Article: James Reinders on the Intel Parallel Studio Beta Program
Avaya Article: Advancing the State of the Art in Customer Service
Adobe Acrobat Connect Pro: Web Conferencing and eLearning Whitepapers
Avaya Article: Avaya AE Services Provide Rapid Telephony Integration with Facebook
Go Parallel Article: Getting Started with TBB on Windows
HP eBook: Storage Networking , Part 1
MORE WHITEPAPERS, EBOOKS, AND ARTICLES
Webcasts
Intel Seminar: Efficiencies in Hardware/Software Virtualization
HP Webcast: Disaster Recovery Planning
Go Parallel Video: Performance and Threading Tools for Game Developers
HP Video: StorageWorks EVA4400 and Oracle
HP Webcast: Storage Is Changing Fast - Be Ready or Be Left Behind
MORE WEBCASTS, PODCASTS, AND VIDEOS
Downloads and eKits
IBM TCO eKIT: Your IT Budget is Under Attack, Get in Control
IBM Energy Efficiency eKIT: Learn How to Reduce Costs
30-Day Trial: SPAMfighter Exchange Module
Red Gate Download: SQL Toolbelt and free High-Performance SQL Code eBook
Iron Speed Designer Application Generator
MORE DOWNLOADS, EKITS, AND FREE TRIALS
Tutorials and Demos
Microsoft Article: Silverlight Streaming--Free Video Hosting for All
Featured Algorithm: Intel Threading Building Blocks - parallel_reduce
HP Demo: StorageWorks EVA4400
MORE TUTORIALS, DEMOS AND STEP-BY-STEP GUIDES
webref The latest from WebReference.com Browse >
The Partial Function Application in JavaScript · Creating Dynamic RSS Feeds with Ajax · Performance Optimizations for High Speed JavaScript
Sitemap · Experts · Tools · Services · Email a Colleague · Contact FREE Newsletters 
 The latest from internet.com
Cablevision Deploys More Hotspots for Commuters · Dell Joins the Netbook Movement with its Inspiron Mini 9 · It's Official: Dell Enters the Netbook Fray


Created: September 28, 1998
Revised: September 28, 1998

URL: http://www.webreference.com/js/column26/console.html