JavaScript: The Definitive Guide and over one million other books are available for Amazon Kindle. Learn more

FREE Shipping on orders over $25.

Used - Good | See details
Sold by Prime1.
 
   
Have one to sell? Sell yours here
Start reading JavaScript: The Definitive Guide on your Kindle in under a minute.

Don't have a Kindle? Get your Kindle here, or download a FREE Kindle Reading App.
Sorry, this item is not available in
Image not available for
Color:
Image not available

To view this video download Flash Player

 

JavaScript: The Definitive Guide [Paperback]

David Flanagan
4.6 out of 5 stars  See all reviews (89 customer reviews)


Available from these sellers.


Free Two-Day Shipping for College Students with Amazon Student

Formats

Amazon Price New from Used from
Kindle Edition $22.79  
Paperback --  
Rent Your Textbooks
Save up to 70% when you rent your textbooks on Amazon. Keep your textbook rentals for a semester and rental return shipping is free.
There is a newer edition of this item:
JavaScript: The Definitive Guide: Activate Your Web Pages (Definitive Guides) JavaScript: The Definitive Guide: Activate Your Web Pages (Definitive Guides) 4.4 out of 5 stars (58)
$28.30
In Stock.

Book Description

August 24, 2006 0596101996 978-0596101992 Fifth Edition

This Fifth Edition is completely revised and expanded to cover JavaScript as it is used in today's Web 2.0 applications. This book is both an example-driven programmer's guide and a keep-on-your-desk reference, with new chapters that explain everything you need to know to get the most out of JavaScript, including:



  • Scripted HTTP and Ajax
  • XML processing
  • Client-side graphics using the canvas tag
  • Namespaces in JavaScript--essential when writing complex programs
  • Classes, closures, persistence, Flash, and JavaScript embedded in Java applications


Part I explains the core JavaScript language in detail. If you are new to JavaScript, it will teach you the language. If you are already a JavaScript programmer, Part I will sharpen your skills and deepen your understanding of the language.



Part II explains the scripting environment provided by web browsers, with a focus on DOM scripting with unobtrusive JavaScript. The broad and deep coverage of client-side JavaScript is illustrated with many sophisticated examples that demonstrate how to:



  • Generate a table of contents for an HTML document
  • Display DHTML animations
  • Automate form validation
  • Draw dynamic pie charts
  • Make HTML elements draggable
  • Define keyboard shortcuts for web applications
  • Create Ajax-enabled tool tips
  • Use XPath and XSLT on XML documents loaded with Ajax
  • And much more


Part III is a complete reference for core JavaScript. It documents every class, object, constructor, method, function, property, and constant defined by JavaScript 1.5 and ECMAScript Version 3.



Part IV is a reference for client-side JavaScript, covering legacy web browser APIs, the standard Level 2 DOM API, and emerging standards such as the XMLHttpRequest object and the canvas tag.



More than 300,000 JavaScript programmers around the world have made this their indispensable reference book for building JavaScript applications.



"A must-have reference for expert JavaScript programmers...well-organized and detailed."

-- Brendan Eich, creator of JavaScript



Editorial Reviews

Review

"Excellent, detailed guide." - Computer Shopper, February 2007

About the Author

David Flanagan is a computer programmer who spends most of his time writing about JavaScript and Java. His books with O'Reilly include Java in a Nutshell, Java Examples in a Nutshell, Java Foundation Classes in a Nutshell, JavaScript: The Definitive Guide, and JavaScript Pocket Reference. David has a degree in computer science and engineering from the Massachusetts Institute of Technology. He lives with his wife and children in the U.S. Pacific Northwest bewteen the cities of Seattle, Washington and Vancouver, British Columbia. David has a blog at www.davidflanagan.com.


Product Details

  • Paperback: 1032 pages
  • Publisher: O'Reilly Media; Fifth Edition edition (August 24, 2006)
  • Language: English
  • ISBN-10: 0596101996
  • ISBN-13: 978-0596101992
  • Product Dimensions: 7.3 x 2 x 9.2 inches
  • Shipping Weight: 3 pounds
  • Average Customer Review: 4.6 out of 5 stars  See all reviews (89 customer reviews)
  • Amazon Best Sellers Rank: #266,269 in Books (See Top 100 in Books)

Customer Reviews

Great book, easy read, well formated and very instrutive. T. W. Freres  |  27 reviewers made a similar statement
Highly recommended to both novice users and highly experienced JavaScript programmers/developers. Siddhardha  |  26 reviewers made a similar statement
Part one of the book is pretty much the same as in the previous edition. calvinnme  |  25 reviewers made a similar statement
Most Helpful Customer Reviews
30 of 30 people found the following review helpful
5.0 out of 5 stars The Indispensable Reference - A Worthy Upgrade January 27, 2007
Format:Paperback
The previous edition of this book, 4th edition, remained at arm's length at all times at work and rescued me repeatedly from various day-to-day JavaScript challenges. It has become tattered from rigorous use. I always loved how the book was organized, with the first half as a walk through the entire gamut of JavaScript's workings -- tutorials, walk-thrus, code samples, cross-browser issues, and practical solutions -- and the second half of the book as a complete JavaScript language and DOM reference. That already very useful format has actually been improved upon. David has combined the DOM API reference and client-side JavaScript reference into a single alphabetized section. Now that I think about it, I did find myself flipping back and forth a lot in the previous edition, so this is a welcome improvement. Each object, property, and method contains a helpful "availability" of that item. This may be the standards spec it came from [DOM Level 2 HTML, ECMAScript v1], the JavaScript version in which it emerged [JavaScript 1.0], or a list of browser versions, if it is a proprietary feature. This is critical info to have at-a-glance - could perhaps save you 2 days of work implementing a non-standard, IE-specific JavaScript feature, when you could have been coding the standards-compliant equivalent. David has removed a lot of the deprecated, not-widely-adopted DOM interfaces that no longer apply to modern browsers. David has also moved focus away from some of the more oddball DOM interfaces that have been replaced by more sensible JavaScript objects that implement those interfaces, for example, window.getComputedStyle() rather than AbstractView.getComputedStyle(). In other words, David has removed all of the "stuff that still exists, but you no longer need to worry about". This makes for a more focused, less cluttered, "on topic", useful tome. I don't need to know about the 10 different methods that browser manufacturers fought over 7 years ago. Tell me what I need to know NOW to write practical, functioning, modern, cross-browser JavaScript. That's exactly what Mr. Flanagan has accomplished.

What else is new in the 5th edition?

1. Nested functions and closures.

2. A dedicated "Classes, Constructors, and Prototypes" chapter, with much more coverage on object-oriented programming in JavaScript.

3. A new chapter on Modules and Namespaces.

4. New chapter on scripting Java with JavaScript.

5. Coverage of the legacy (Level 0) DOM has been combined with the W3C standard DOM. More consolidation. Less flipping back and forth.

6. Cookies and Client-Side Persistence. Updated coverage on cookies, and brand new coverage of other client-side persistence techniques, like IE userData persistence, and Flash Shared Object Persistence.

7. AJAX - Coverage of scripted HTTP calls using the now famous XMLHttpRequest object.

8. XML - Demonstrates how to create, load, transform, query, serialize, and extract info from XML docs.

9. Client-Side Graphics - JavaScript's graphics capabilities. The cutting edge <canvas> tag, SVG, VML, and communicating with the Flash plug-in.

10. Scripting Java Apps and Flash Movies - Another brand new chapter.

So, is the 5th edition worth the purchase? Absolutely. This book is a must-have for any web development library. I turn to it repeatedly. Here's an example.

Last week, I overheard a developer on my team proclaim to someone, "We can't do that. JavaScript can't control stuff in another frame." They went and informed my boss how monumental their task was becoming as they proposed a hacky, inelegant server-side workaround.

I managed to grab the one developer and said, "JavaScript certainly can talk across frames."

"Really?!", he asked, astonished. I opened "The Definitive Guide" to the part on cross-frame scripting and bookmarked it for them.

"Oh, wow! GREAT!", he exclaimed, "That completely solves our problem. Totally cool!" and zipped away book in hand. Hours later, they had it worked out, rather than days with the server-side solution.

I've seen some one-star, complaint-type reviews posted that this isn't a beginner book. Exactly right, but I'm confused as to how a quality rating [of 1 to 5 stars] equates, in any way, to skill level of the book, or its ability to meet someone's self-conceived personal notions of what the book is supposed to contain. There are some overview-type chapters that go over syntax, operators, scope, expressions, and the usual array of language basics, but these reviewers are correct in that this book is not a beginner's tutorial on JavaScript. It is a meat and potatoes, soup to nuts definitive guide and reference on all of the important and practical aspects of JavaScript programming. It is not a cookbook of cute-but-useless cut-n-paste recipes [although there are plenty of USEFUL code examples]. It is not the quick-and-dirty example of how to slap the hottest AJAX library into your site to attempt to make it behave like a Windows app. The chapter on AJAX shows you how to use the XML HTTP object directly, wrapped up in some nice reusable routines, so you can WRITE YOUR OWN AJAX-based features [which I prefer over using someone else's complicated, obfuscated framework].

Great job, again, David! If you develop websites in any capacity, you need this book. It should be on every developer's shelf.
Was this review helpful to you?
34 of 37 people found the following review helpful
5.0 out of 5 stars The 5th Edition was well worth the wait August 18, 2006
Format:Paperback|Amazon Verified Purchase
First off, this is a review of the 5th edition, released August 1, 2006. All other reviews prior to that date are talking about previous editions of this book, which are considerably different than the current one.

The reason the various editions of this book have been so good over the last ten years is probably because they have all been written by the same author, David Flanagan, who seems to really know his audience. Part one of the book is pretty much the same as in the previous edition. It acts as a complete tutorial on the language, taking you all the way from basic language constructs into object-oriented programming and finally basic scripting.

Where things get really interesting and cutting edge is in part two of the book, "Client-Side Javascript". Most of the examples we've seen so far, while legal JavaScript code, had no particular context - they were JavaScript fragments that ran in no specified environment. Chapters 13 and 14, "Javascript in Web Browsers", and "Scripting Browser Windows" provide that context. This begins with a conceptual introduction to the web browser programming environment and basic client-side JavaScript concepts. Next, it discusses how to embed JavaScript code within HTML documents so it can run in a web browser. Finally, the chapter goes into detail about how JavaScript programs are executed in a web browser.

Next, the book turns its attention to the Document Object Model (DOM). Client-side JavaScript exists to turn static HTML documents into interactive programs. It is the Document object that gives JavaScript interactive access to the content of otherwise static documents. In addition to the properties that provide information about a document as a whole, the Document object has a number of very important properties that provide information about document content. Chapter 15 explains all of these issues.

Cascading Style Sheets (CSS) is a technology intended for use by graphic designers or anyone concerned with the precise visual display of HTML documents. It is of interest to client-side JavaScript programmers because the document object model allows the styles that are applied to the individual elements of a document to be scripted. Used together, CSS and JavaScript enable a variety of visual effects loosely referred to as Dynamic HTML (DHTML). This is the subject of chapter 16, "Cascading Style Sheets and Dynamic HTML".

Interactive JavaScript programs use an event-driven programming model. In this style of programming, the web browser generates an event whenever something interesting happens to the document or to some element of it. For example, the web browser generates an event when it finishes loading a document, when the user moves the mouse over a hyperlink, or when the user clicks on the Submit button of a form. If a JavaScript application cares about a particular type of event for a particular document element, it can register an event handler - a JavaScript function or snippet of code - for that type of event on the element of interest. Then, when that particular event occurs, the browser invokes the handler code. All applications with graphical user interfaces are designed this way: they sit around waiting for the user to do something interesting (i.e., they wait for events to occur) and then they respond. Chapter 17, "Events and Event Handling", discusses these issues.

The use of HTML forms is basic to almost all JavaScript programs. Chapter 18, "Forms and Form Elements", explains the details of programming with forms in JavaScript. It is assumed that you are already somewhat familiar with the creation of HTML forms and with the input elements that they contain. If not, you may want to refer to a good book on HTML.

The Document object contains a property named "cookie" that, on the surface, appears to be a simple string value. A cookie is a small amount of named data stored by the web browser and associated with a particular web page or web site. Cookies serve to give the web browser a memory, so that scripts and server-side programs can use data that was input on one page in another page, or so the browser can recall user preferences or other state variables when the user leaves a page and then returns. Thus, the cookie property controls a very important feature of the web browser and is important enough to warrant a complete chapter of its own, "Cookies and Client-Side Persistence".

Internet Explorer on Windows, Safari on Mac OS-X, Mozilla on all platforms, Konqueror in KDE, IceBrowser on Java, and Opera on all platforms provide a method for client side Javascript to make HTTP requests. From humble beginnings as an oddly named object with few admirers, it's blossomed to be the core technology in something called AJAX. The object in question is called the XMLHTTPRequest object, and it is not limited to being used with XML. It can request or send any type of document, although dealing with binary streams can be problematical in Javascript. This chapter, "Scripting HTTP", covers these issues. Since AJAX actually stands for "Asynchronous Javascript and XML", the next chapter discusses Javascript and XML working together.

The final two chapters of part two of the book are very cool and interesting to me, but might not be of interest to the standard professional Javascript programmer, since it deals with client-side graphics and movies using Javascript. This includes working with VML, SVG, graphics and Java, and finally using Javascript with Flash 8. Parts three and four form a reference section for Javascript, including the various methods and their usages.

The source code is well commented and explained, as in all previous editions, and is available for download from the book's website. This book is a great instructive textbook and reference on Javascript. I highly recommend it.
Comment | 
Was this review helpful to you?
19 of 19 people found the following review helpful
5.0 out of 5 stars The one JavaScript book to rule them all... October 20, 2006
By F. Wong
Format:Paperback
I'm a technical trainer, and we've decided to distribute this book as part of our Ajax courseware. We've reviewed many other JavaScript books, but we keep coming back to this one.

Suffice to say - its an excellent Core javaScript coursebook by itself (the first 220 pages). But the latest 5th edition is also a great resource for other Web 2.0 relevant topics: Ajax/Remote Scripting, CSS, Event handling, DOM scripting, ... The fifth edition also includes comments related to the just-release Internet Explorer 7.

Add in another 100+ page Core JavaScript reference section

Plus another 240+ page Client-Side JavaScript Object reference section (classes, methods, properties, and event handlers...such as XMLHttpRequest, Document, Window, Event)

And it all adds up to one thick/heavy book that deserves to be on your bookshelf...

My only complaint - the reference section has changed. Previous editions would tell you specifically which browser versions are applicable. In this edition, the author chose to tell us what standard provides the specification. Ex: "ECMAScript v1". IMHO - I wish the reference section consistently showed both bits of information ALL the time: the specification standard, and the browsers which support it.
Comment | 
Was this review helpful to you?
Most Recent Customer Reviews
5.0 out of 5 stars An excellent book in excellent conditions
I bought this book used (the first one that I bought not new), I was not sure in which conditions the book was going to be, but for my surprise it was like new. Read more
Published 23 days ago by German Martinez
5.0 out of 5 stars Very Informative
The book is very informative. However, I didn't benefit from its content simply because I found an online training service (Lynda. Read more
Published 2 months ago by Merciless Max
5.0 out of 5 stars Good explanations
The book contains more than I expected on the subject and I have been learning a lot with it since I got it.
Published 4 months ago by Moacir Siqueira Jr
4.0 out of 5 stars excellent
totally got me up to speed on javascript, clearly written and lots of good details as usual for an O'reilly book
Published 4 months ago by zeebo
3.0 out of 5 stars Good but not for everyone
The book is supposed to be the best JavaScript book on the market, even today. But it's not for amateurs. I found it a lot more informative than any other book I peeked at. Read more
Published 16 months ago by Great Guy
5.0 out of 5 stars Comprehensive coverage for its time of publication (2006)
If you are looking for a comprehensive resource to teach you everything you need to know about JavaScript, get this book. Read more
Published 17 months ago by josh168
3.0 out of 5 stars It's OK
To me, this book is not easy to read. I only read a few charter. Most of the time, I search information from the internet more than read the book.
Published 21 months ago by ML
4.0 out of 5 stars Definitive Guide - Maybe!
This book is likely going to be helpful as a REFERENCE guide to javascript users. Consider two things: (1) this book will not teach you Javascript-Ajax (2)This book will not... Read more
Published 23 months ago by Calvin O. Walker
2.0 out of 5 stars Too much paper, not enough knowledge.
For a book which calls itself "the definitive guide" I was hoping for a much longer and more lucid explanation of OOP in Javascript, prototypes and patterns of how to use them. Read more
Published on February 21, 2011 by Victor Wiewiorowski
5.0 out of 5 stars Excellent Book
The great thing about it being a 5th edition, most of the issues, errors, oversights, and omitted content found in 1st editions are not a problem. Read more
Published on February 8, 2011 by Jonathan Steinmann
Search Customer Reviews
Only search this product's reviews

What Other Items Do Customers Buy After Viewing This Item?


Forums

Search Customer Discussions
Search all Amazon discussions

Topic From this Discussion
5th Ed. is FOUR years out of date... any word of a SIXTH edition coming...
The answer to your first question is http://www.amazon.com/JavaScript-Definitive-Guide-Activate-Pages/dp/0596805527

As to your second question, I was wondering the same thing.
Apr 13, 2010 by Neurosion |  See all 4 posts
Which edition is the digital download? Be the first to reply
Is 5th Edition *MUCH* different from the 3rd edition? Be the first to reply
beginners?
Absolutely positively not. It would be a terrible mistake and really hurt your energy and enthusiasm.

There is a very good "Javascript for Beginners" that gets reasonably deep and is plenty hard enough for a total beginner.

That said, when a new edition of this comes out, it might be... Read more
Feb 15, 2010 by R. M. Barge |  See all 2 posts
Start a new discussion
Topic:
First post:
Prompts for sign-in
 




So You'd Like to...



Look for Similar Items by Category