Once you’ve worked through this book, you should be well on your way to spicing up your Web sites with JavaScript. But there’s a lot more to learn about the JavaScript language, and you’ll probably have questions as you write your own code.
The best place to get those questions answered is online, as you might expect. There are many resources on the Web that can help you deepen your understanding of JavaScript.
In this appendix, we’ll point you to several of the most helpful JavaScript-oriented Web sites, and we’ll even mention a few other books that we found helpful.
But first, a gentle reminder: the Net is not a static, unchanging place. Web sites can and often do change the addresses of their pages, so it’s possible that the URLs we list will become out of date by the time you use them. We’re just reporting the URLs; we have no control over them. Sometimes, entire Web sites disappear. If you find a link that’s become stale, check our companion Web site at www.javascriptworld.com to see if we have posted a new location for the page you were looking for.
The original JavaScript documentation is found at Mozilla’s Web site, but there’s a lot of good information at sites from Microsoft and at independent JavaScript pages as well. Here are some of the best:
Since Netscape developed JavaScript, it’s no surprise that the Mozilla project, the open-source creators of Mozilla and Firefox (the successors to Netscape’s browser), has lots of great information about the language and further development.
http://developer.mozilla.org/en/javascript
This site is designed for all levels of JavaScript users and includes links to tools, documentation, and online communities . The documentation includes the Core JavaScript Reference (covering JavaScript 1.5), which gives you a rundown on the basics of the language, and definitions and explanations of the concepts used in JavaScript. It suffers from a moderately geeky difficulty level and sketchy examples, but you should be able to puzzle it out once you’ve digested this book. Also found here are the Core JavaScript Guide and explanations of what was added in JavaScript from versions 1.6 on.
http://developer.mozilla.org/en/venkman
When you need to debug your JavaScript, it certainly would be nice to have a good tool to use to help you. Wish no longer; Venkman, the JavaScript debugger from the Mozilla project, is a pretty good tool that works with Firefox, Thunderbird, and Mozilla, and it allows you to step through your code, setting breakpoints, inspecting objects and variables as the script executes, and working with JavaScript source code.
The blog itself says that it “is here to highlight leading edge stuff that people are doing with Mozilla Firefox and the open Web”—and that’s just what it does.
http://msdn.microsoft.com/hbxc2t98.aspx
Microsoft’s own version of JavaScript—called JScript—has its own pages on the Microsoft Developer Network site , where you can learn about its similarities to (and differences from) Mozilla’s JavaScript. You’ll find a detailed JScript Language Reference and the JScript User’s Guide.
This site isn’t just about JavaScript, but it is all about Apple’s Safari browser and its WebKit rendering engine—which aren’t just for the Mac anymore. Here’s where you can get information straight from Apple employees about what the next versions of Safari will and won’t do. You’ll also find downloadable nightly builds of WebKit, giving you features long before Apple ships them to the public.
There are many weblogs devoted to JavaScript; here are a couple of our favorites, but they by no means form an exhaustive list.
This is a good blog with news, lists of JavaScript and Ajax resources, podcasts with JavaScript and Ajax luminaries, and much more . It has sometimes gotten a bit breathless over the fabulousness of Ajax, making you think that it’s the cure for cancer and a terrific dessert topping all rolled into one, but the blog’s perspective has mellowed over time. It used to have a bad habit of being a little confused about what Ajax actually is (no, Flash is not any part of Ajax); but over time they’ve learned a little more about that as well. And it’s a great site to find out who’s doing cool user interface tricks.
http://www.quirksmode.org/blog/
Peter-Paul Koch is a JavaScript developer in the Netherlands. The best thing about his site is that he keeps it amazingly up-to-date with the latest news about browsers and their JavaScript capabilities. It’s not a tutorial site, but along with the blog there is a great deal of basic information that will be helpful to the beginning scripter.
Though the authors would naturally like to think that the book you’ve got in your hands is all you’ll ever need to become a JavaScript expert, they recognize that you might just want a bit more information after you’ve eagerly devoured this book. There are approximately a zillion JavaScript books on the market; here (in no particular order) are some of the books that we think are the best.
Written by David Flanagan and published by O’Reilly Media, this is an exhaustive reference to the JavaScript language. Not for the faint of heart, this is where the experts turn to look up those weird operators and nail down that odd syntax. After a lengthy wait, the sixth edition of this book has finally arrived, bringing its knowledge base up to date.
Peter-Paul Koch is one of the acknowledged masters of JavaScript. In this book from New Riders, he uses real-world script examples he created for paying clients to take you through a journey that is both theoretical and practical.
John Resig (of jQuery fame) wrote this book to help intermediate-level JavaScripters become advanced scripters. Not for the novice, it’s a good book to take you onwards from where this book ends.
Given that this is, after all, a book with the word Visual in its name, it’s not surprising to us that some readers prefer a more visual method of learning. Here are two video training resources we like because, well, we made them. Both are available via streaming video and as CDs from www.lynda.com.
Some of what’s in this course may seem familiar, as JET and the book you’re holding right now had common origins. It’s a good way to start learning the basics in a video tutorial format.
Picking up where JET left off, AET goes beyond the basics and into intermediate-level scripting.
When you first start writing code, it may feel like you’re running into trouble with every line—but happily, there are many online resources to help you through that rocky beginning. Here are some of our favorites.
If you like Mozilla’s Venkman (or even if you don’t), you’ll love Firebug . You can use it with Firefox to debug not just your scripts, but your HTML and CSS as well. It’s free, with good documentation, handy logging, and all the breakpoint and DOM support you could want.
If the only thing missing to make your (scripting) life complete is similar functionality for IE, Safari, and Opera, then you need to check out Firebug Lite at http://getfirebug.com/lite.html . It doesn’t have all the functionality of its big brother, but it’s very handy to have a single common interface when trying to track down a random bug.
If you’re like us, the first thing you do if you have trouble with HTML and CSS is run to a validator. If you’ve wished for something similar with JavaScript, you may have heard of JSLint, a code-checking tool. And if, like us (and many other JavaScript developers), you found that JSLint just wasn’t designed for real-world use, then what you want is JSHint. It’s designed both for checking code and for flexibility, and it has none of JSLint’s “my way or the highway” rigid enforcement.
Ever wish you could use your browser not just for testing your code, but also for writing it—after all, why should you have to keep toggling back and forth? That’s part of what pastebins are all about—the ability to write and run in the same window.
The other handy benefit is being able to save your files and show them to other people (that is, you have something to point to while yelling for help). And even better—they can make changes to your code as well, helping you to find and fix those sneaky bugs.
There are numerous pastebin sites online, some of which support HTML, CSS, and JavaScript. Here are two we (and others) like:
So there you are, trying to track down a JavaScript problem, and you do what you normally do: put your problem into Google and see what it suggests. And somehow, you find that when it comes to code, the same site keeps being suggested over and over :
If you spend enough time coding, you’ll find Google sending you here often. And then you’ll find yourself returning without stopping by Google first. And then you’ll find yourself answering other people’s questions while you’re getting help on your own.
You can browse the site by tags (such as javascript
or jquery
) or just put your problem in the search box. Chances are good that your question has already been asked and answered; if not, click the Ask Question button and give a thorough description.
One of the co-authors of this book (Dori) found herself spending enough time on the site that she took the next step and applied there for a job—but we don’t expect everyone to be that enthusiastic. However, if you do find Stack Overflow useful, keep an eye out for user Dori ♦, who is now a community manager and technical evangelist for Stack Exchange (Stack Overflow’s parent company).
18.117.11.247