Whether you are just starting out with JavaScript, or you have JavaScript experience and want more ideas and tips, this is the best twelve bucks you’ll ever spend. JavaScript Phrasebook by Christian Wenz [Amazon link] is chuck full of useful information in a no-nonsense style. This pocket-sized paperback has 12 chapters spanning 245 pages: JavaScript Basics, Common Phrases, Images and Annotations, CSS, DOM and DHTML, OOP and Events, Cookies, Forms, Windows and Frames, Web Services, AJAX (and Related Topics), and Embedded Media.
I learned more in 45 minutes of reading this book than in the previous dozen hours I had spent online via Google searches.
Tip #1: This book makes an especially good starting point for any Java developers who currently only know enough JavaScript to be dangerous.
Tip #2: Do you work with a web designer? This book would make a perfect token-of-appreciation gift, and you’ll benefit from your designer gaining in JavaScript knowledge.
Tip #3: The only advice I read in the book that didn’t work for me is on page 12, where Wenz says that it’s no longer necessary these days to enclose JavaScript code in comment notation, like this:
<script language="JavaScript"> <!-- (code goes here) --> </script>
If the code happens to use less-than-signs (e.g. “if (count < 10)…”), then the comment notation is still necessary, because it means that those less-than-signs do not need to be escaped.