Overview
Learning JavaScript generally means learning to script a page in a WebBrowser. JavaScript is also used for programming MozillaXul applications. And JavaScripts can run stand-alone like VisualBasic scripts and DOS batch files in MicrosoftWindows. IwannaLearnJavaScript assumes you will be scripting web pages.
Learning to script web pages with JavaScript involves learning not only the JavaScript language itself but the objects that comprise the browser page and and other browser elements, plus the browser's event handling mechanism.
Online:
Documentation:
Language:
Articles & Tutorials:
Some Wiki pages:
Books:
Newer to older
JavaScript: A Programmer's Companion from Basics through DHTML, CSS and DOM is great for total beginners. JavaScript: The Definitive Guide will teach you the details of the language. It's kind of dated, though, and doesn't veer from the core language and objects. -- This was a judgement on the previous, fourth edition, so probably needs updating. JavaScript: The Complete Reference also teaches the details of the language. It's new enough and farther from the core to introduce AjaxWebApplications and processing RssFeeds. DHTML Utopia assumes you're already familiar with JavaScript. It presents loads of whiz-bang cookbook uses, including an entire section on Ajax. Most books, especially older ones, only teach for various versions of InternetExplorer and NetscapeNavigator. This book assumes DOM-compliance (IE6, MozillaFirefox, SafariBrowser, etc.) and points out glitches when scripting the less-popular browsers.
Tools:
Download and install MozillaFirefox or the full-blown MozillaBrowser. Why? Because its "JavaScript Console" and "DOM Inspector" are invaluable. The JavaScript Console keeps a log of error messages, and the DOM Inspector lets you (duh!) inspect and navigate the DocumentObjectModel of any web page. Keep in mind that although modern browsers all have pretty much the same DOM, a web page in a Mozilla browser will have a lot more Text nodes than in InternetExplorer. The Mozilla browsers consider whitespace, such as newlines, between HTML tags to be text while InternetExplorer ignores it. I'm not sure how other browsers handle this, but InternetExplorer is, as usual, "non-standard."
Mozilla's JavaScript Console helps you track and find errors while using a MozillaBrowser, but what about other browsers? Be sure set your InternetExplorer preferences to pop up JavaScript error messages. You won't get a nice running log, however. (Does M$'s DotNet developer environment provide good JavaScript/JScript development tools?) I have a boatload of objections to the SafariBrowser, one of which is, I can't for the life of me figure out how to get it to display JavaScript errors. Maybe it can't. Safari feels like black box. I know nothing about OperaBrowser and many other browsers.
Safari has a Debug menu from which you can turn on a JavaScript console, log exceptions to the Console, and evaluate html snippets (including