Debugging JavaScript

In this appendix, I will introduce you to some tricks and tools to debug your JavaScript code. It is very important to get acquainted with debugging tools, because programming consists to a large extent of trying to find out what went wrong a particular time. Some browsers help you with this problem; others make it harder by having their debugging tools hidden away or by returning cryptic error messages that confuse more than they help. Some of my favorites include philosophical works like “Undefined is not defined” or the Microsoft Internet Explorer (IE) standard “Object doesn’t support this property or method.” ...

Get Beginning JavaScript with DOM Scripting and Ajax, Second Edition now with the O’Reilly learning platform.

O’Reilly members experience live online training, plus books, videos, and digital content from nearly 200 publishers.