JavaScript : The Definitive Guide, 4th Edition
The Book in a Nutshell
Although much of the core of the language, addressed in Part I, has changed relatively little since JS:TDG3, Flanagan has added coverage of new issues that have emerged in the past several years, like the discussion of ASCII, Latin-1, and 16-bit Unicode in the beginning of Chapter 2 (ECMA-262 Edition 1, the spec that defined ECMAScript, included Unicode support for il8n purposes, so ECMAScript compliance requires Unicode support), and pruned away quite a bit of material related to NS 4.x-proprietary features, like the explanation of import and export (previously found in Chapter 6), that are naturally of increasingly less interest to developers as that line of browsers recedes into history. Much of Part II, which considers client-side JavaScript and DOM in all its glory, is entirely new or has been completely re-written. Where the chapter on the Document Object model in the 3rd edition only covered the "Level 0" DOM (the objects, properties, and methods first exposed by the 4.0 browsers), JS:TDG4 tackles the Level 0 DOM and the W3C DOM Recommendations through level 1 Core and HTML and touches on some DOM Level 2 topics, including the Range and Traversal APIs. "Cascading Style Sheets and Dynamic HTML" and "Events and Event Handling" are two other chapters in the Client-Side JavaScript section that have really come into their own in this edition.
The large (more than 300 pages), but somewhat muddled "JavaScript Reference" in the 3rd edition (it had commingled the objects, properties, and methods included in the core of the JavaScript language with those of the Level 0 DOM) has been split into 4 discrete appendices ("Core JavaScript Reference", "Client-Side JavaScript Reference", "W3C DOM Reference", and "Class, Property, Method, and Event Handler Index") that, taken together, comprise more than 400 more pages of information. NS 4.x fans can take comfort from the fact that, while much NS 4.x-specific information has been culled from the body of the text, Netscape 4.x still shows up in some screen captures (along with Microsoft Internet Explorer and Netscape 6).
What was GreatException handling (using throw and try/catch/finally) is covered in greater detail. In Chapter 15, "Forms and Form Elements", JavaScript interactions with buttons, toggle buttons (checkbox and radio elements), text fields, hidden elements, and fieldset elements are addressed individually in new sections not present in the corresponding chapter in JS:TDG3 and the section on select and option elements goes into more detail than in the previous edition. Throughout the book, improvements have been made to figures and tables - like the addition of the "Supported by" column in Table 19-1 : "Event handlers and the HTML elements that support them", which now helpfully lists the elements for which the event handlers can be triggered after identifiers for the versions of Netscape and Internet Explorer in which the behavior is observed. Finally, the book as a whole is significantly more readable. The type used for the text of the code examples and tables was too "light" in the 3rd edition (at least in my copy), and I was glad to see that it's a bit heavier in the 4th.
What was Not so Great
I nearly came up empty-handed in my search for defects in this book, but noticed that, in tables 11-1 and 11-3, "Automatic data type conversions" and "Data type manipulation in JavaScript" respectively, information relating to the treatment of arrays and functions present in the corresponding tables in the 3rd edition has been removed. That's really my only gripe. Some might wish that Flanagan had included more compatibility information, but, realistically, the task of fully documenting the intricacies of what's supported by which browser (or, in the case of Win MSIE, which JScript dll is installed) could probably fill a separate book all of its own. Moreover, Chapter 20 ("Compatibility Techniques"), may be brief at only 11 pages, but it does a good job of tackling best practices in dealing with JavaScript and DOM cross-browser compatibility challenges.
To Buy or Not to Buy
If you're in the market for a good JavaScript (or JavaScript+DOM) book, then JavaScript : The Definitive Guide should undoubtedly be your first choice. Although my 3rd edition was so tattered from long use that I really had no choice but to upgrade, even owners of the 3rd edition who've managed to keep their copies in near-mint condition will probably still want to get their hands on the 4th edition if they haven't already done so - for the meatier and updated reference appendices if for no other reason.
Table of Contents
Preface
- Chapter 1. Introduction to JavaScript
Part I : Core JavaScript
- Chapter 2. Lexical Structure
- Chapter 3. Data Types and Values
- Chapter 4. Variables
- Chapter 5. Expressions and Operators
- Chapter 6. Statements
- Chapter 7. Functions
- Chapter 8. Objects
- Chapter 9. Arrays
- Chapter 10. Pattern Matching with Regular Expressions
- Chapter 11. Further Topics in JavaScript
Part II : Client-Side JavaScript
- Chapter 12. JavaScript in Web Browsers
- Chapter 13. Windows and Frames
- Chapter 14. The Document Object
- Chapter 15. Forms and Form Elements
- Chapter 16. Scripting Cookies
- Chapter 17. The Document Object Model
- Chapter 18. Cascading Style Sheets and Dynamic HTML
- Chapter 19. Events and Event Handling
- Chapter 20. Compatibility Techniques
- Chapter 21. JavaScript Security
- Chapter 22. Using Java with JavaScript
Part III : Core JavaScript Reference
Part IV : Client-Side JavaScript Reference
Part V : W3C DOM Reference
Part VI : Class, Property, Method, and Event Handler Index
Index
You can purchase JavaScript: The Definitive Guide from bn.com. Slashdot welcomes readers' book reviews -- to see your own review here, read the book review guidelines, then visit the submission page.
Damn popups.
23 ways to annoy people with pop-up ads.
Je t'aime Stéphanie
the maturation of the Netscape 6.x,7.x / Mozilla browser suite
It's friday afternoon, it's 16:30 over here, I'm at work, it has been a busy day, and I was convinced it read 'the masturbation..'. I think I'll call it a day and go home now.
just what we all need, more websites with popup windows. Seriously though, I've been giving lots of thought to starting an online petition to get the Javascript standards group to remove those nasty popup windows or atleast have a mandotory option to disable it in each and every browser. (Sorry just turning off javascript isn't good enough for me)
New Edition? Overdue? I know that /. reviews are not necessarily timely, but I've had the 4th edition of the JavaScript book sitting at elbow for at least six months.
Instead of paying too much to Barnes and Noble, you can get it from AddAll for quite a bit cheaper.
Edit -> Preferences -> Advanced -> Scripts and Plugins -> Open Unrequested Windows. Uncheck. Done.
Problem solved.
I'm sure the Microsoft FUDders will pop in and claim the VBScript killed JavaScript. Not true! JavaScript is standardized and cross-platform, VBScript isn't.
Heck, Macromedia uses JavaScript as the programming language for FireWorks and DreamWeaver customization. I think the next gimp release will allow you to use Javascript for scripting (like you can do with Perl and Scheme). Too bad source forge searching is down right now, or I'd find the link for that project....
Do you even lift?
These aren't the 'roids you're looking for.
I'll never buy this particular book, because the second edition of the book was the first - of an increasingly larger number - of O'Reilly books that really weren't up to the O'Reilly snuff-of-old.
I miss the old days where I would buy O'Reilly books - no matter the topic - almost without cracking open the cover because I knew I could count on an authoritative, well-written-and-edited book that almost certainly was one of the best books on its topic. Now, it seems like O'Reilly is milking their goodwill and pumping out bushels of substandard quality books. I know, because I've bought a bunch of them.
Now, there doubtless were substantial revisions and additions to bring this particular book up to the 4th edition, but I just can't bring myself to buy an updated copy of what was at the time perhaps the worst O'Reilly book that WASN'T "CGI Programming on the World Wide Web" by Shishir Gundavaram.
Fool me once, shame on you
Fool me twice, shame on me
I own a copy of this book and have thus far fully appreciated having it.
Unfortunately, when most people hear the word JavaScript they immediately think of how annoying window.open() is. It is a shame, really, as a lot of interesting things can be done using JavaScript. Especially when combined with the DOM and all the options that opens up.
My question, then, is simple. How many people have noticed that true knowledge in JavaScript is severely lacking in many people who do web developement? I've met lots of people who claim to know JavaScript well, but they can barely write the examples provided in most books. I think that for a web developer, knowledge in client side scripting should be moved up on the priority notches. Am I alone in this?
I own the third edition of this book, and bought it when I was starting to write a web-based decision support system for a very large beverage company. I can safely say that this book, and the HTML Definitive Guide (also by O'Reilly) were critical to the success of the system.
I have seldom had a question about JavaScript for which I could not find the answer in this book. I referred to it so frequently during the development of our system that it is now the most dog-eared book in my collection. I'm going to order the fourth edition simply because this baby is ready for retirement.
If you are learning client-side JavaScript, by all means purchase this book. The first half of the book is a guided introduction to the language and does a wonderful job of explaining the syntax of the language, the underlying object model, and virtually every pertinent feature of the language. The real value, though, is in the reference, which documents every object, method, property and event of standard JavaScript.
Non-conformists who wish to exploit features unique to Internet Explorer will find some reference material here, but the book does try to focus on the "standard" features of the language, which I think is a good thing.
You just can't go wrong with this book.
Do you even lift?
These aren't the 'roids you're looking for.
I have to say that this book in both it's second and third editions has helped me through countless problems. I keep the newer edition at work and the older one at home. My 2nd edition has just about had it so I think it's time to upgrade and rotate. I may just put the 2nd edition under glass as a tribute. Thanks David!
THIS SPACE FOR RENT
Javascript has been typecast. There are a lot of useful things you can do with it if you want to, but it definitely gets a bad rap for all the popup functions and such. This isn't to say it's a particularly good language, just that it does have its uses.
In SOVIET RUSSIA... erm...NSA AMERICA, the Internet logs onto YOU!
...is a full blown programming language and as with anything that works, it can be used in good and bad ways; so please spare me with the popup bla. JavaScript is the most compatible way of applying client side programming logic for internet applications today (it's been some time since we where talking about mere web pages) and is the best in what it does. This book is indeed the best in it's category (and I've been over a number of books on the subject, as well as several on-line tutorials); I bought it the day it came out. It can be used as a refference as well as a way to learn the language. Another piece of good work by Flanagan.
"You laugh at me because I am different. I laugh at you because you're all the same." --Vick Imbornoni
I actually do.
Karma: Terrible (mostly affected by moderation done to your comments)
but it has been out a while. I have an old second edition that is heavily thumbed. I recently inquired and for those that don't know, O'Reily has an upgrade program where for a small fee (I think it was $10 plus shipping, but don't quote me.) you get an upgraded edition. sweet. Look on their website for info.
DO NOT DISTURB THE SE
Variables can be declared or not, line termination is optional, it's supposed to be object-oriented but there's no way to decalare class or methods, some construct are really horrible:
value =selectBox[selectdBox.selectedIndex].value
Scripting language for HTML should be easy,simple and have the right features (who needs the C++ binary operators anyway >>, Any project going to implement different scripting language for mozilla?
Je t'aime Stéphanie
1. How to Annoy Anyone on the Planet in 3 seconds (Or less!)
2. Breeding Cookies for Fun and Profit
3. Learn Browser Crashing in 21 Days
4. Fantasy Pretend Programming for Beginners
5. Make Everyone Hate the Web in Five Easy Steps
Oy, I'm getting to be so cynical in my old age.
Note to the humor impared: This is a joke. Don't take it seriously because this is a joke. Don't be offended and flame me because this is a joke. Don't get all huffy and defend java and java script to your last dying finger twitch because this is a joke.
Here it is, the definitive statement on this post: THIS IS A JOKE!
Everything in the Universe sucks: It's the law!
I am a user of the Javascript Bible. I found that it has some of the best examples, and does a particularly good job with NS4 strangeness. How does this book compare
but considering development time of Netscape 6.x words *masturbation* and *maturation* have almost the same meaning.
I like seeing non-IE browsers getting coverage in the mainstream technical press. IE has something like a 95% market share, and many people use this to justify making websites that only work in IE. If *I* were running a web business then that statistic would tell me:
"Hey, 1 out of 20 of our potential customers can't use our website!"
And I think that IT should be pitching that same line to the suits.
Anyway, until someone develops intellegent JS filtering that works, I just turn it off.
In Capitalist America, bank robs you!
Does anyone know a good site that has either a chart or a listing the various functions that browsers supports from IE to Netscape?
Does someone want to briefly outline the major javascript compatibility differences between NS4, NS6/Mozilla, and IE?
I keep hearing second hand information from web developers that Mozilla's javascript implementation "breaks" compatibility, whatever that means.
I can't think of an O'Reilly book I own which isn't excellent. True, some of them are old classics like "UNIX Power Tools", and "Managing Projects with make". But their most recent books have been just as exemplary - the latest edition of the Camel book simply improves on the earlier editions. The "CVS Pocket Reference" is exactly what I needed for day-to-day CVS work. The latest edition of "Web Designer in a Nutshell" has a permanent spot on my desk now that I have a website.
So - what titles would you warn against?
--
CPAN rules. - Guido van Rossum
It's really obvious that the people posting derisive comments about Javascript have never had to develop a site that actually does anything useful. Try creating some pages that accept a credit application without using Javascript (and MS-only shit need not apply). If/when you even get basic DOB validation done, show it to us.
LEXX
"Gold still represents the ultimate form of payment in the world." - Alan Greenspan, 1999
Once you've mastered that, you can go on to advanced topics like a "browser detection script", that refuses to show users any of the website unless they happen to have the same version of IE that you are using right now!
The best type of technology is not a means to an end, it is an end in itself. Javascript is one of them.
Javascript has nothing to do with Java. Netscape chose the name to make it popular.
Programming with bad VM is alike a sex with an ugly woman.
Programming with VM without good libraries is alike a sex with a doll.
Programming on language without good paradigms is alike a sex with animals.
You're wrong. It's perfectly valid to use an end p tag.
http://www.w3.org/TR/html4/struct/text.html#h-9.3What about:
<br> and,
<hr>
Scripting should be knowledge area number two, right after proper html coding, and before design.
Nobody should be taught or allowed to use a Wysiwyg editor until they can build and work without it.
Other folks who come to me for fixes to thier Frontpage and Dreamweaver problems drive me absolutely nuts.
Ok, you've got wizards and plug-ins. What do you do when they don't work, or when your stuff doesn't display like you need it to? You harass people like me to tweak what you should have known before you ever were allowed to be paid to do web work.
End of rant... Keep coming to me, I complain, but I do enjoy the attention.
XHTML mandates that all tags be closed. So, <p>'s MUST be accompanied by a </p>. <img> tags will become <img />. There are other small differences from html 4.01, you can find them all at
http://www.w3.org/TR/xhtml1/. For the sake of forward compatibility, use xhtml when writing pages. For the sake of being nice to all your viewers, validate your pages at validator.w3.org.
;)
I have read all of the html specs and recomendations thoroughly (as well as css, xml, and others), and do not claim to have mastered html...
God became man to enable men to become sons of God. -C.S. Lewis
Comment removed based on user account deletion
How well written. You really said it. I couldn't agree more about the misconception of javascript. Most people think of either popups or the slow compiling grey box. I've been using Javascript with DOM for a while. I love how it enables true usable applications.
any opinions on VB Script. Some people seem to live by it. Can't figure it out for the life of me.
Mhmm. Joke or not - I recently taught myself JavaScript and I was positively surprised. Since I'm working on a Mozilla project, I was spared the usual hell of incompatibilities. Here's some points I didn't know about JS:
1. JS can fully manipulate any XML document.
2. Mozilla is largely implemented in JS (natively implemented libraries + JS + XML).
3. JS is kinda clean and simple. Everything is based on associative arrays.
Take C++ or Delphi (ObjectPascal) programming, for example. By searching the web, you can find A LOT of useful articles, tutorials and references, and they are current.
If you search the web for JavaScript, 99% of the things you will find are:
- Lots of ready made JS scripts and effects for your site. Most of the time they work, but the code in them is usually so poorly written that understanding and modifying them is very hard.
- Tutorials and articles that are way outdated and refer to ancient versions of browsers, without using new features.
I found that most of the books are severely outdated, too.
What we need is a good, comprehensive book which teaches JavaScript STANDARDS and how they apply to the browsers currently in use.
I don't need 100 ready made scripts.
Instead, I need a complete list of what objects are available, what events, methods and procedures are available, a DETAILED description of each object, method, procedure, and most importantly, for each item above, I need to know what browser supports it!
Also, a detalied description of common techniques (like using an absolute positioned DIV) is badly needed.
A book about JavaScript should also be about DHTML. The book should teach JavaScript and DHTML together.
I don't know how good the O'Reilly book is, because I haven't read it, but I recommend JavaScript Bible, Golden Edition, by Danny Goodman. It's pretty good.
You could have saved yourself some effort by not stating that this is a joke.
As you can see from the people that replied to your post (above), some people just don't get it even if you tell it to them.
BTW, I am not complaining about your post but about the ones that, in spite the fact that you told them it was a joke, replied to complain about the joke not being funny/accurate/complete etc...
JOKE: Why did the chicken cross the road?A: To get to the other side...
Replies:
I guess some people don't have a sense of humour or live in a very tense environment they don't have time for silly jokes (only the good ones!!)
cheersIt's not necessarily evil all the time. There are a variety of sites I visit where smaller popup windows are used to view comments or deal with additional information. Recently, on our intranet, we used a popup to allow users to select a date from a calendar, as sticking the calendar on the main page would just be clutter.
TARGET="_new" is useful, but it won't allow you to specify the size or format of the browser window.
F12- Check refuse popup windows
Is there anything worse than a Christian HTML KnowItAll?
Since this is a real issue for anyone that does a fair amount of web development, I thought maybe I should point out a good resource that really supplements any JS book you use..
The IRT JavaScript FAQ is a surprisingly comprehensive list of FAQ and "how do I..." type questions for JavaScript. I find myself relying very heavily on it for snippets of code.
Once you've "learned" JavaScript, a site like this is great when you don't want to reinvent the wheel or spend 20 minutes skimming a book trying to figure out why something works in Netscape but not IE...
In the Portland, Ore area and like card games? Check out: http://groups.yahoo.com/group/portlandgames/
Have fun!
--
Socrates was asked where he was from. He replied not "Athens," but "The world."
In a move I find more childish than the trolls it aims to stop, AC posting has been turned off. This is more of an outrage than the lameness filter that filters nothing.
Try to AC posttest_p0st
I too usually surf with Javascript turned off (tip: add the Preferences toolbar to mozilla to be able to toggle js/java/cookies/etc. on and off quickly) but Javascript is gaining ground as a more general purpose language. See a recent article in Javaworld on using Netscape's free Rhino library to add javascriptability to your applications. Also, Javascript is how many XUL mini-apps are implemented.
I usually don't come down on this site, but come on guys - this book has been out for months. OR are the sales a little low and O-Reilly paid for the review?????????????????
...try AdSubtract.
Sits in your system tray; works with any browser; kills popups and all other advertisements. You'll be surprised at how much more friendly your browsing experience is.
I have been investigating the use of XUL/XPCOM/Javascript for the creation of a user application with a database backend (after "discovering" how XUL works in Moz). However, I have ran into a bit of a stumbling block.
The application I am wanting to develop will replace a current 2-tier application based on VB/Access. What I wanted to do was create a front-end using XUL/Javascript to access (initially, but would be migrated to PostgreSQL later) the MS Access DB via ODBC - however, I haven't been able to find a way to do that which doesn't flag security (I even tried a convoluted method of creating a java applet that referenced a java application class that used JDBC to connect, but when it tried it throws an access violation error).
I understand the reasons this is happening (sandbox model and all) - and I ran across many people seeing this same problem. The only solution I could think of was essentially going toward a CGI-style 3-tier model - having the Javascript communicate to the backend scripts (most of the examples used Java servelets, but I imagine the same could be done using CGI) via HTTP, which would then pass the info back via the same route which the Javascript would present back to the user.
Is this truely the only way? For a long term solution, realize that this is what I want to do, but the initial conversion I am doing is really for a demo (to show the PHB's what can be done), and I don't really want to go through the whole trouble of trying to set up a backend server for a demo which might not even get the project the go-ahead (plus the attendent task of getting the permission to do it anyhow).
Thank you for any response you can give...
Reason is the Path to God - Anon
JavaScript is not object oriented at all. It's prototype based.
There is no inheritance at all, it's just copying values from a previous defination.
in JS you can declare Object, then declare Object that 'extends' the first one. All the engine is doing is copying all the values from the first Object to the second. You can't call super.method() because that doesn't exist. If you could call super.method, then there would be inheritance.
Methods are not overloadable and can take any number of parameters. Objects are wacky because the same name can point to both a function and a variable.
var o;
o.callme = function ( a ) { alert ( a ) ; };
o.callme('a');
o.callme = ' a ';
alert( a.callme);
This code is kind confusing, and as such is one reason that I don't like JS, because other people code like this.
So to sum up, JS is a neat language but its 'features' make it hard to create large applications with it.
Which JavaScript language version is that from? I'm assuming that it's 2.0, not 1.2. Which browsers support it?
Javascript sucks and it should be avoided like the plague. I hate visiting websites with stupid cutsey popups and mouseovers.
Seems a lot of websites try to de-emphasize their hideous design flaws and lack of content with Javascript that reminds me of cheap parlor tricks.
The worst thing is that it's buggy and half the sites that use it don't know how to use it correctly, so I get a Javascript error in my browser and the rest of their crappy site doesn't even work.
JavaScript : The Definitive Guide, 4th Edition
Posted by timothy on Friday July 26, @10:30AM
briandonovan writes "A new edition? Given all of the changes in the web programming landscape since the 1998 publication of the previous edition, David Flanagan's JavaScript : The Definitive Guide (JS:TDG4), 4th Edition was overdue. Flanagan delivers a book that more than measures up to its predecessor - JS:TDG4 includes a substantial amount of new material and, as a whole, has been extensively updated. The crushing gain in browser market share by Microsoft's Internet Explorer offering, the maturation of the Netscape 6.x,7.x / Mozilla browser suite and its entry into the fray along with a slew of other Gecko-based browsers, promulgation of newer versions of the ECMAScript specification (accompanied by new implementations in JavaScript and JScript), and the publication of successive W3C DOM Recommendations are all reflected in this edition." JavaScript : The Definitive Guide, 4th Edition
author David Flanagan
pages 916
publisher O'Reilly
rating 9
reviewer Brian Donovan
ISBN 0596000480
summary The latest edition of JavaScript : The Definitive Guide brings the popular reference up to date with extensive coverage of W3C DOM Level 1 and 2 and a much-improved and expanded set of appendices.
The Book in a Nutshell
Although much of the core of the language, addressed in Part I, has changed relatively little since JS:TDG3, Flanagan has added coverage of new issues that have emerged in the past several years, like the discussion of ASCII, Latin-1, and 16-bit Unicode in the beginning of Chapter 2 (ECMA-262 Edition 1, the spec that defined ECMAScript, included Unicode support for il8n purposes, so ECMAScript compliance requires Unicode support), and pruned away quite a bit of material related to NS 4.x-proprietary features, like the explanation of import and export (previously found in Chapter 6), that are naturally of increasingly less interest to developers as that line of browsers recedes into history. Much of Part II, which considers client-side JavaScript and DOM in all its glory, is entirely new or has been completely re-written. Where the chapter on the Document Object model in the 3rd edition only covered the "Level 0" DOM (the objects, properties, and methods first exposed by the 4.0 browsers), JS:TDG4 tackles the Level 0 DOM and the W3C DOM Recommendations through level 1 Core and HTML and touches on some DOM Level 2 topics, including the Range and Traversal APIs. "Cascading Style Sheets and Dynamic HTML" and "Events and Event Handling" are two other chapters in the Client-Side JavaScript section that have really come into their own in this edition.
The large (more than 300 pages), but somewhat muddled "JavaScript Reference" in the 3rd edition (it had commingled the objects, properties, and methods included in the core of the JavaScript language with those of the Level 0 DOM) has been split into 4 discrete appendices ("Core JavaScript Reference", "Client-Side JavaScript Reference", "W3C DOM Reference", and "Class, Property, Method, and Event Handler Index") that, taken together, comprise more than 400 more pages of information. NS 4.x fans can take comfort from the fact that, while much NS 4.x-specific information has been culled from the body of the text, Netscape 4.x still shows up in some screen captures (along with Microsoft Internet Explorer and Netscape 6).
What was Great
Exception handling (using throw and try/catch/finally) is covered in greater detail. In Chapter 15, "Forms and Form Elements", JavaScript interactions with buttons, toggle buttons (checkbox and radio elements), text fields, hidden elements, and fieldset elements are addressed individually in new sections not present in the corresponding chapter in JS:TDG3 and the section on select and option elements goes into more detail than in the previous edition. Throughout the book, improvements have been made to figures and tables - like the addition of the "Supported by" column in Table 19-1 : "Event handlers and the HTML elements that support them", which now helpfully lists the elements for which the event handlers can be triggered after identifiers for the versions of Netscape and Internet Explorer in which the behavior is observed. Finally, the book as a whole is significantly more readable. The type used for the text of the code examples and tables was too "light" in the 3rd edition (at least in my copy), and I was glad to see that it's a bit heavier in the 4th.
What was Not so Great
I nearly came up empty-handed in my search for defects in this book, but noticed that, in tables 11-1 and 11-3, "Automatic data type conversions" and "Data type manipulation in JavaScript" respectively, information relating to the treatment of arrays and functions present in the corresponding tables in the 3rd edition has been removed. That's really my only gripe. Some might wish that Flanagan had included more compatibility information, but, realistically, the task of fully documenting the intricacies of what's supported by which browser (or, in the case of Win MSIE, which JScript dll is installed) could probably fill a separate book all of its own. Moreover, Chapter 20 ("Compatibility Techniques"), may be brief at only 11 pages, but it does a good job of tackling best practices in dealing with JavaScript and DOM cross-browser compatibility challenges.
To Buy or Not to Buy
If you're in the market for a good JavaScript (or JavaScript+DOM) book, then JavaScript : The Definitive Guide should undoubtedly be your first choice. Although my 3rd edition was so tattered from long use that I really had no choice but to upgrade, even owners of the 3rd edition who've managed to keep their copies in near-mint condition will probably still want to get their hands on the 4th edition if they haven't already done so - for the meatier and updated reference appendices if for no other reason.
Table of Contents
Preface
Chapter 1. Introduction to JavaScript
Part I : Core JavaScript
Chapter 2. Lexical Structure
Chapter 3. Data Types and Values
Chapter 4. Variables
Chapter 5. Expressions and Operators
Chapter 6. Statements
Chapter 7. Functions
Chapter 8. Objects
Chapter 9. Arrays
Chapter 10. Pattern Matching with Regular Expressions
Chapter 11. Further Topics in JavaScript
Part II : Client-Side JavaScript
Chapter 12. JavaScript in Web Browsers
Chapter 13. Windows and Frames
Chapter 14. The Document Object
Chapter 15. Forms and Form Elements
Chapter 16. Scripting Cookies
Chapter 17. The Document Object Model
Chapter 18. Cascading Style Sheets and Dynamic HTML
Chapter 19. Events and Event Handling
Chapter 20. Compatibility Techniques
Chapter 21. JavaScript Security
Chapter 22. Using Java with JavaScript
Part III : Core JavaScript Reference
Part IV : Client-Side JavaScript Reference
Part V : W3C DOM Reference
Part VI : Class, Property, Method, and Event Handler Index
Index
You can purchase JavaScript: The Definitive Guide from bn.com. Slashdot welcomes readers' book reviews -- to see your own review here, read the book review guidelines, then visit the submission page.