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

Buy Used
Used - Good See details
$12.14 & eligible for FREE Super Saver Shipping on orders over $25. Details

or
Sign in to turn on 1-Click ordering.
 
   
Kindle Edition
 
   
Sell Back Your Copy
For a $3.35 Gift Card
Trade in
Have one to sell? Sell yours here
JavaScript: The Definitive Guide
 
 
Start reading JavaScript: The Definitive Guide: 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.

JavaScript: The Definitive Guide [Paperback]

David Flanagan (Author)
4.5 out of 5 stars  See all reviews (85 customer reviews)


Available from these sellers.


Textbook Student FREE Two-Day Shipping for Students. Learn more

Formats

Amazon Price New from Used from
Kindle Edition $23.93  
Paperback --  
Sell Back Your Copy for $3.35
Whether you buy it used on Amazon for $8.97 or somewhere else, you can sell it back through our Book Trade-In Program at the current price of $3.35.
Used Price$8.97
Trade-in Price$3.35
Price after
Trade-in
$5.62
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 (30)
$31.49
In Stock.

Book Description

0596101996 978-0596101992 August 24, 2006 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


Customers Who Bought This Item Also Bought


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: 9.3 x 7 x 2 inches
  • Shipping Weight: 3 pounds
  • Average Customer Review: 4.5 out of 5 stars  See all reviews (85 customer reviews)
  • Amazon Best Sellers Rank: #65,447 in Books (See Top 100 in Books)

 

Customer Reviews

85 Reviews
5 star:
 (63)
4 star:
 (12)
3 star:
 (5)
2 star:
 (3)
1 star:
 (2)
 
 
 
 
 
Average Customer Review
4.5 out of 5 stars (85 customer reviews)
 
 
 
 
Share your thoughts with other customers:
Most Helpful Customer Reviews

24 of 24 people found the following review helpful:
5.0 out of 5 stars The Indispensable Reference - A Worthy Upgrade, January 27, 2007
This review is from: JavaScript: The Definitive Guide (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.
Help other customers find the most helpful reviews 
Was this review helpful to you? Yes No


33 of 36 people found the following review helpful:
5.0 out of 5 stars The 5th Edition was well worth the wait, August 18, 2006
Amazon Verified Purchase(What's this?)
This review is from: JavaScript: The Definitive Guide (Paperback)
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.
Help other customers find the most helpful reviews 
Was this review helpful to you? Yes No


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
This review is from: JavaScript: The Definitive Guide (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.
Help other customers find the most helpful reviews 
Was this review helpful to you? Yes No

Share your thoughts with other customers: Create your own review
 
 
 
Most Recent Customer Reviews











Only search this product's reviews



Inside This Book (learn more)
Key Phrases - Statistically Improbable Phrases (SIPs): (learn more)
advanced event handling, cookie alternatives, basic event handling, simulating classes, lexical structure, browser information, module utilities, document object collections, finding elements, typeof canvas, capturing event handlers, single global symbol, handler info, original event model, typeof element, typeof value, primitive string value, defer attribute, scope chain, global window object, normal document flow, enumerable properties, onunload handler, standard event model, instanceof object
Key Phrases - Capitalized Phrases (CAPs): (learn more)
Internet Explorer, Scripting Java, Scripted Client-Side Graphics Example, Scripting Documents Example, Scripting Browser Windows, Hello World, Flash Player, Pattern Matching, Scalable Vector Graphics, Prototypes Example, Scripting Flash, Done Figure, Get Flash, Adding Content, The Definitive Guide, Cascading Style Sheets, Miscellaneous Operators, Scripting Form Elements, Scripting Inline Styles, Document Object Model, Defining Regular Expressions, Vector Markup Language, Embedding Scripts, Obtaining Window, Scripting Images
Browse Sample Pages:
Front Cover | Table of Contents | First Pages | Index | Back Cover | Surprise Me!
Search Inside This Book:


What Other Items Do Customers Buy After Viewing This Item?


Tags Customers Associate with This Product

 (What's this?)
Click on a tag to find related items, discussions, and people.
 
(29)
(27)
(17)
(13)
(4)

Your tags: Add your first tag
 

Customer Discussions

This product's forum
See all 4 discussions...  
Start a new discussion
Topic:
First post:
Prompts for sign-in
 


Active discussions in related forums
Search Customer Discussions
   
Related forums





Look for Similar Items by Category


Look for Similar Items by Subject