BN.com Gift Guide

JavaScript: The Definitive Guide

( 27 )

Overview

JavaScript: The Definitive Guide provides a thorough description of the core JavaScript language and its client-side framework, complete with sophisticated examples that show you how to handle common tasks like validating form data, working with cookies, and creating cross-browser dynamic content. The book also contains an in-depth reference section that covers every core and client-side JavaScript function, object, method, property, constructor, and event handler. HTML authors can use this book to learn how to ...
See more details below
Available through our Marketplace sellers and in stores.

Pick Up In Store Near You

Reserve and pick up in 60 minutes at your local store

Other sellers (Paperback)
  • All (59) from $1.99   
  • New (2) from $6.61   
  • Used (57) from $1.99   
Close
Sort by
Page 1 of 1
Showing All
Note: Marketplace items are not eligible for any BN.com coupons and promotions
$6.61
Seller since 2007

Feedback rating:

(833)

Condition:

New — never opened or used in original packaging.

Like New — packaging may have been opened. A "Like New" item is suitable to give as a gift.

Very Good — may have minor signs of wear on packaging but item works perfectly and has no damage.

Good — item is in good condition but packaging may have signs of shelf wear/aging or torn packaging. All specific defects should be noted in the Comments section associated with each item.

Acceptable — item is in working order but may show signs of wear such as scratches or torn packaging. All specific defects should be noted in the Comments section associated with each item.

Used — An item that has been opened and may show signs of wear. All specific defects should be noted in the Comments section associated with each item.

Refurbished — A used item that has been renewed or updated and verified to be in proper working condition. Not necessarily completed by the original manufacturer.

New
2001-12-15 Paperback New NEW. NO remainder markings. A brand new book perfect inside and out.

Ships from: Midland, VA

Usually ships in 1-2 business days

  • Canadian
  • International
  • Standard, 48 States
  • Standard (AK, HI)
  • Express, 48 States
  • Express (AK, HI)
$23.20
Seller since 2008

Feedback rating:

(172)

Condition: New
0596000480 BRAND NEW NEVER USED IN STOCK 125,000+ HAPPY CUSTOMERS SHIP EVERY DAY WITH FREE TRACKING NUMBER

Ships from: fallbrook, CA

Usually ships in 1-2 business days

  • Standard, 48 States
  • Standard (AK, HI)
Page 1 of 1
Showing All
Close
Sort by
JavaScript: The Definitive Guide: Activate Your Web Pages

Available on NOOK devices and apps  
  • NOOK Devices
  • Samsung Galaxy Tab 4 NOOK 7.0
  • Samsung Galaxy Tab 4 NOOK 10.1
  • NOOK HD Tablet
  • NOOK HD+ Tablet
  • NOOK eReaders
  • NOOK Color
  • NOOK Tablet
  • Tablet/Phone
  • NOOK for Windows 8 Tablet
  • NOOK for iOS
  • NOOK for Android
  • NOOK Kids for iPad
  • PC/Mac
  • NOOK for Windows 8
  • NOOK for PC
  • NOOK for Mac
  • NOOK for Web

Want a NOOK? Explore Now

NOOK Book (eBook)
$22.99
BN.com price
(Save 42%)$39.99 List Price
Sending request ...

Overview

JavaScript: The Definitive Guide provides a thorough description of the core JavaScript language and its client-side framework, complete with sophisticated examples that show you how to handle common tasks like validating form data, working with cookies, and creating cross-browser dynamic content. The book also contains an in-depth reference section that covers every core and client-side JavaScript function, object, method, property, constructor, and event handler. HTML authors can use this book to learn how to build dynamic web pages with JavaScript. Experienced programmers can quickly find the information they need to start writing JavaScript programs. This book is an indispensable reference for all JavaScript programmers, regardless of experience level.


Geared toward JavaScript programmers, this book provides an excellent programmer's guide and reference manual for JavaScript 1.2. It includes a thorough description of the core JavaScript language and a detailed reference section.

Read More Show Less

Editorial Reviews

From Barnes & Noble
The Barnes & Noble Review
Over the past few years, the JavaScript language has matured. Not only is JavaScript now an international standard (called ECMAScript), the standard itself is in its third, refined version. Conformant implementations are available in several leading browsers, from Microsoft Internet Explorer 6 to Mozilla; and open source versions are available to be incorporated into any application that can benefit from a scripting language.

All this is to say that JavaScript is more useful than ever, and the JavaScript you use now can be relied upon (at least as much as anything in the computer industry ) to remain stable for years to come. It's worth your time to become a more capable JavaScript programmer -- and David Flanagan's JavaScript: The Definitive Guide, Fourth Edition may be your best tool for achieving that goal.

Well-known as "The Rhino Book" for its cover, JavaScript: The Definitive Guide has long been an outstanding resource for JavaScript programmers. Flanagan writes with discipline and clarity, and his book combines excellent tutorial coverage with a detailed reference that documents the classes, methods, and properties defined by the core JavaScript language.

But a lot's changed since the 1998 edition. And if you got involved with JavaScript at the heat of the web gold rush, a lot's changed since whatever JavaScript book you rely on was written. Here's just some of what's new and different in this book.

First of all, Flanagan's thoroughly updated his coverage to reflect JavaScript 1.5 and the aforementioned ECMA-262 third edition standard. Previous editions had a heavy focus on Netscape's implementation of JavaScript; that will obviously no longer do, so Flanagan has moved to a focus on the official standard. Since browser conformance has improved significantly, this book will help you write code that'll survive pretty much any browser you throw at it. (The reference section carefully specifies when each language element was introduced, and which versions of the standard support it.)

Flanagan's reorganized the book. For one thing, core language coverage has been separated with coverage of using JavaScript in client-side browsers, recognizing that many JavaScript developers nowadays aren't working in classic web browser environments. More important, he's moved the coverage of the W3C's DOM implementation into a section of its own, and substantially expanded that coverage. (Both DOM Level 2 and Level 1 are covered, with Level 0 coverage kept for backward compatibility.)

JavaScript: The Definitive Guide, Fourth Edition begins with an overview of what JavaScript can and cannot do, including some lingering myths about the language (many still view it as purely a simple scripting language, and are surprised by its depth when they attempt to perform complex tasks with it.) Next, Flanagan reviews the fundamentals of JavaScript 1.5: its lexical structure, data types and values, variables, expressions, operators, and statements.

If you're an experienced Java, C++, or C programmer, much of Section I will be familiar: JavaScript was designed to help developers leverage existing skills. Section II, however, focuses on stuff that's handled significantly differently in JavaScript. Here, Flanagan covers functions, objects, arrays, and pattern matching with regular expressions. He also introduces several advanced features, notably JavaScript's automatic data type conversion, garbage collection, lexical scoping, and function constructors.

Next, Flanagan focuses on client-side JavaScript. He shows how JavaScript integrates with web browsers; introduces the Window object and JavaScript's event-driven programming model; and shows how to use the Document Object to expose an HTML document's contents to JavaScript code. The book includes chapters on forms and form elements; cookies; and scripting CSS/DHTML to manipulate the style, appearance, and position of HTML document elements.

Notwithstanding Microsoft's dominance, it's still a diverse world out there. Flanagan shows how to avoid, minimize, and mitigate browser incompatibilities, introducing techniques for testing features, implementing platform-specific workarounds, and testing compatibility with server-side scripts. There's coverage of security, and a quick look at using Java with JavaScript. And the 300-page reference? Invaluable.

You'll live happily with this book for a long time. (Bill Camarda)

Bill Camarda is a consultant, writer, and web/multimedia content developer with nearly 20 years' experience in helping technology companies deploy and market advanced software, computing, and networking products and services. He served for nearly ten years as vice president of a New Jersey–based marketing company, where he supervised a wide range of graphics and web design projects. His 15 books include Special Edition Using Word 2000 and Upgrading & Fixing Networks For Dummies®, Second Edition.

Read More Show Less

Product Details

  • ISBN-13: 9780596000486
  • Publisher: O'Reilly Media, Incorporated
  • Publication date: 11/1/2001
  • Series: Definitive Guides Series
  • Edition description: Fourth Edition
  • Edition number: 4
  • Pages: 936
  • Product dimensions: 7.04 (w) x 9.14 (h) x 1.73 (d)

Meet the Author

David Flanagan is a computer programmer who spends most of his time writing about JavaScript and Java. His other books with O'Reilly include JavaScript Pocket Reference, Java in a Nutshell, Java Foundation Classes in a Nutshell, and Java Examples in a Nutshell.

David has a degree in computer science and engineering from the Massachusetts Institute of Technology. He lives with his wife and son in the U.S. Pacific Northwest between the cities of Seattle, Washington and Vancouver, British Columbia.

Read More Show Less

Read an Excerpt

Chapter 17: The Document Object Model

A document object model (DOM) is an application programming interface (API) for representing a document (such as an HTML document) and accessing and manipulating the various elements (such as HTML tags and strings of text) that make up that document. JavaScript-enabled web browsers have always defined a document object model; a web-browser DOM may specify, for example, that the forms in an HTML document are accessible through the forms[] array of the Document object.

In this chapter, we'll discuss the W3C DOM, a standard document object model defined by the World Wide Web Consortium and implemented (at least partially) by Netscape 6 and Internet Explorer 5 and 6. This DOM standard1 is a full-featured superset of the traditional web-browser DOM. It represents HTML (and XML) documents in a tree structure and defines properties and methods for traversing the tree and examining and modifying its nodes. Other portions of the standard specify techniques for defining event handlers for the nodes of a document, working with the style sheets of a document, and manipulating contiguous ranges of a document.

This chapter begins with an overview of the DOM standard and then describes the core portions of the standard for working with HTML documents. The discussion of the core standard is followed by short sections that explain the DOM-like features of Internet Explorer 4 and Netscape 4. The chapter ends with an overview of two optional parts of the DOM standard that are closely related to the core. Later chapters cover advanced DOM features for working with style sheets and events.

An Overview of the DOM

The DOM API is not particularly complicated, but before we can begin our discussion of programming with the DOM, there are a number of things you should understand about the DOM architecture.

Representing Documents as Trees

HTML documents have a hierarchical structure that is represented in the DOM as a tree structure. The nodes of the tree represent the various types of content in a document. The tree representation of an HTML document primarily contains nodes representing elements or tags such as <body> and <p> and nodes representing strings of text. An HTML document may also contain nodes representing HTML comments.2 Consider the following simple HTML document:

<html>
  <head>
    <title>Sample Document</title>
  </head>
  <body>
    <h1>An HTML Document</h2>
    <p>This is a <i>simple</i> document.
  </body>
</html>

The DOM representation of this document is the tree pictured in Figure 17-1.

If you are not already familiar with tree structures in computer programming, it is helpful to know that they borrow terminology from family trees. The node directly above a node is the parent of that node. The nodes one level directly below another node are the children of that node. Nodes at the same level, and with the same parent, are siblings. The set of nodes any number of levels below another node are the descendants of that node. And the parent, grandparent, and all other nodes above a node are the ancestors of that node.

Nodes

The DOM tree structure illustrated in Figure 17-1 is represented as a tree of various types of Node objects. The Node interface3 defines properties and methods for traversing and manipulating the tree. The childNodes property of a Node object returns a list of children of the node, and the firstChild, lastChild, nextSibling, previousSibling, and parentNode properties provide a way to traverse the tree of nodes. Methods such as appendChild( ), removeChild( ), replaceChild( ), and insertBefore( ) enable you to add and remove nodes from the document tree. We'll see examples of the use of these properties and methods later in this chapter.

Types of nodes

Different types of nodes in the document tree are represented by specific subinterfaces of Node. Every Node object has a nodeType property that specifies what kind of node it is. If the nodeType property of a node equals the constant Node.ELEMENT_NODE, for example, you know the Node object is also an Element object and you can use all the methods and properties defined by the Element interface with it. Table 17-1 lists the node types commonly encountered in HTML documents and the nodeType value for each one.

Table 17-1: Common node types

Interface

nodeType constant

nodeType value

Element

Node.ELEMENT_NODE

1

Text

Node.TEXT_NODE

3

Document

Node.DOCUMENT_NODE

9

Comment

Node.COMMENT_NODE

8

DocumentFragment

Node.DOCUMENT_FRAGMENT_NODE

11

Attr

Node.ATTRIBUTE_NODE

2

The Node at the root of the DOM tree is a Document object. The documentElement property of this object refers to an Element object that represents the root element of the document. For HTML documents, this is the <html> tag that is either explicit or implicit in the document. (The Document node may have other children, such as Comment nodes, in addition to the root element.) The bulk of a DOM tree consists of Element objects, which represent tags such as <html> and <i>, and Text objects, which represent strings of text. If the document parser preserves comments, those comments are represented in the DOM tree by Comment objects. Figure 17-2 shows a partial class hierarchy for these and other core DOM interfaces.

Attributes

The attributes of an element (such as the src and width attributes of an <img> tag) may be queried, set, and deleted using the getAttribute( ), setAttribute( ), and removeAttribute( ) methods of the Element interface.

Another, more awkward way to work with attributes is with the getAttributeNode( ) method, which returns an Attr object representing an attribute and its value. (One reason to use this more awkward technique is that the Attr interface defines a specified property that allows you to determine whether the attribute is literally specified in the document, or whether its value is a default value.) The Attr interface appears in Figure 17-2, and it is a type of node. Note, however, that Attr objects do not appear in the childNodes[] array of an element and are not directly part of the document tree in the way that Element and Text nodes are. The DOM specification allows Attr nodes to be accessed through the attributes[] array of the Node interface, but Microsoft's Internet Explorer defines a different and incompatible attributes[] array that makes it impossible to use this feature portably....

Read More Show Less

Table of Contents

Dedication

Preface

Chapter 1: Introduction to JavaScript

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

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

Core JavaScript Reference

Client-Side JavaScript Reference

W3C DOM Reference

Class, Property, Method, and Event Handler Index

Chapter 26: Class, Property, Method, and Event Handler Index

Colophon

Read More Show Less

Customer Reviews

Average Rating 4
( 27 )
Rating Distribution

5 Star

(14)

4 Star

(4)

3 Star

(4)

2 Star

(2)

1 Star

(3)

Your Rating:

Your Name: Create a Pen Name or

Barnes & Noble.com Review Rules

Our reader reviews allow you to share your comments on titles you liked, or didn't, with others. By submitting an online review, you are representing to Barnes & Noble.com that all information contained in your review is original and accurate in all respects, and that the submission of such content by you and the posting of such content by Barnes & Noble.com does not and will not violate the rights of any third party. Please follow the rules below to help ensure that your review can be posted.

Reviews by Our Customers Under the Age of 13

We highly value and respect everyone's opinion concerning the titles we offer. However, we cannot allow persons under the age of 13 to have accounts at BN.com or to post customer reviews. Please see our Terms of Use for more details.

What to exclude from your review:

Please do not write about reviews, commentary, or information posted on the product page. If you see any errors in the information on the product page, please send us an email.

Reviews should not contain any of the following:

  • - HTML tags, profanity, obscenities, vulgarities, or comments that defame anyone
  • - Time-sensitive information such as tour dates, signings, lectures, etc.
  • - Single-word reviews. Other people will read your review to discover why you liked or didn't like the title. Be descriptive.
  • - Comments focusing on the author or that may ruin the ending for others
  • - Phone numbers, addresses, URLs
  • - Pricing and availability information or alternative ordering information
  • - Advertisements or commercial solicitation

Reminder:

  • - By submitting a review, you grant to Barnes & Noble.com and its sublicensees the royalty-free, perpetual, irrevocable right and license to use the review in accordance with the Barnes & Noble.com Terms of Use.
  • - Barnes & Noble.com reserves the right not to post any review -- particularly those that do not follow the terms and conditions of these Rules. Barnes & Noble.com also reserves the right to remove any review at any time without notice.
  • - See Terms of Use for other conditions and disclaimers.
Search for Products You'd Like to Recommend

Recommend other products that relate to your review. Just search for them below and share!

Create a Pen Name

Your Pen Name is your unique identity on BN.com. It will appear on the reviews you write and other website activities. Your Pen Name cannot be edited, changed or deleted once submitted.

 
Your Pen Name can be any combination of alphanumeric characters (plus - and _), and must be at least two characters long.

Continue Anonymously
Sort by: Showing all of 14 Customer Reviews
  • Posted February 5, 2009

    Good for Beginners

    JavaScript: The Definitive Guide by David Flanagan is probably the best reference possible for this extremely useful, but complex language. I came to this book with absolutely no knowledge of Javascript, and so this book was my first real taste of the language. The first part of the book deals specifically with syntax and foundations of Javascript, so anyone with programming experience can read the first part of this book and be comfortable with programming in Javascript. This section is integral for understanding the nuanced complexities of a language without having to struggle with hard to find errors. Simple distinctions of types and values were very helpful to me.<BR/><BR/>The second part of the book is a by-examples tour through the intermingled worlds of Javascript and web browsers. Here you¿ll learn DOM scripting, AJAX, DHTML events, and more to make appealing interactive webpages. Personally, I found this section a little harder to use, and I would have preferred a, perhaps simpler, or at least more atomic explanation of AJAX as I am still confused by the whole concept. In either case, this section covers everything you need to know about Web 2.0.<BR/><BR/>The last two sections of the book are straight reference about everything in the core of Javascript and in client-side Javascript. This is a very well organized section of the book and it helps when you need to know exactly how a certain method or class works and this section alone is worth the cost of the book.<BR/><BR/>I'd recommend this book to anyone who wants to get a taste of Javascript or for anyone who is looking towards Javascript as a way to access web programming. The book is not for everyone, but I would argue that Javascript is a very important language to learn in this web-centric age.

    1 out of 1 people found this review helpful.

    Was this review helpful? Yes  No   Report this review
  • Anonymous

    Posted February 15, 2000

    The best of the best

    You can't get a better book on Javascript than this!

    1 out of 1 people found this review helpful.

    Was this review helpful? Yes  No   Report this review
  • Anonymous

    Posted December 29, 2005

    If Only One

    If you purchase only one JavaScript book let it be this one. The content is thorough and insightful. The writing style won't put you to sleep! After you have core JavaScript principles down you will keep this book nearby for reference. This book will give you the foundation and drive to move forward. Whether you are writing JavaScript for web pages, JavaScript for PhotoShop, or writing in SwishScript for SwishMax, you can use this book to chart your course. It's well worth the money.

    Was this review helpful? Yes  No   Report this review
  • Anonymous

    Posted November 15, 2005

    Review of JavaScript: The Definitive Guide

    'JavaScript: The Definitive Guide' is not a step by step guide to JavaScript any more than an encyclopedia is a step by step guide. The book does provide an authoritative analysis of the language including a brief history of the language, data types, operators, statements, functions, objects, and arrays. The author does a good job of addressing some of the assumptions of the language and how these assumptions may or may not be like other languages such as C++ or Java. The author also clarifies the different levels of support for certain aspects of the language both within the discussion and with the large JavaScript reference section. The book also provides a handy and thorough W3C DOM reference for working with various aspects of DHTML. Some of the material in this book will provide a critical understanding to JavaScript's more advanced features. With the emergence of AJAX, many web developers are turning to JavaScript to provide solutions for dynamic web based applications. Now that JavaScript is more fully supported in modern browsers, web developers may want to turn to 'JavaScript: The Definitive Guide' to enhance or polish existing JavaScript skills. If you are looking for a quick introduction to JavaScript, you may find yourself disappointed. However, if you are already familiar with JavaScript and need a reference to look up an answer to your problem or need a guide for fine tuning your DHTML skills, you may that this book is a rich resource for you.

    Was this review helpful? Yes  No   Report this review
  • Anonymous

    Posted June 11, 2003

    What coverage!

    I am an applications programmer who has had to turn into a web programmer for a special project in my field. Before reading this book, I knew some HTML from my college days, but was overwhelmed by the project before me. I bought this book at a B&N store after debating between at least three other competitors. I am SO glad I bought this one! It has helped me get my project off the ground! I now feel comfortable with JavaScript and should be able to handle other web projects that come my way.

    Was this review helpful? Yes  No   Report this review
  • Anonymous

    Posted August 6, 2002

    This book *is* the best JS resource

    This book is the best JavaScript resource around, but a word of warning to those who expect it to be like the Visual QuickStart series: It's not. This is a programmer's book about a real programming language, it's not a cut and paste example guide. They both have their place in the world, but this book should not be downgraded because it is the former and not the latter. If you're serious about learning JS as a programming language, and have taken at least one solid course in programming concepts, this is the place to go. <p> The previous reviewer summed it up well. Due to wildly diverging implementations, this book doesn't necessarily cover everything, but it's about as close as one can get and remain sane. For the rest, pick up the O'Reilly Dynamic HTML, or just consult on-line documentation. <P> Until I started programming server-side Java, this book was, by far, the most used book on my desk.

    Was this review helpful? Yes  No   Report this review
  • Anonymous

    Posted July 17, 2001

    excellent book

    This is an excellent reference source for the javascript programmer.

    Was this review helpful? Yes  No   Report this review
  • Anonymous

    Posted July 26, 2001

    The most dog-eared book on my shelf

    When I picked up this book in 1998, I knew absolutely no JavaScript. I sat down to read the first chapter, and stopped after the 10th or so, finally realizing that everyone else had long since gone to sleep. This book has held my attention ever since. I was going to give it 4 stars because it is somewhat dated and lacks modern DOM documentation, but I just couldn't. That would be punishing for being so good -- so good that it hasn't needed updating, that is. Besides, this isn't a DOM book. Pair it with Danny Goodman's book on Dynamic HTML, and you'll have everything you need for almost every client-side task. My one criticism: I found myself wanting more discussion of Regular Expressions.

    Was this review helpful? Yes  No   Report this review
  • Anonymous

    Posted March 7, 2001

    Jolly good book

    Despite the reviews written here, I think this book is spiffing. Granted, it's not for complete beginners, but then again - its a programming language - so what do you expect??!! Its ideal for someone who has good programming skills and wants to learn JavaScript as a string to their bow.

    Was this review helpful? Yes  No   Report this review
  • Anonymous

    Posted October 29, 2000

    Pretty good

    Good: generally thorough, well-written. Bad: no CD-ROM (examples would have been great), differences between IE and Navigator not thoroughly treated.

    Was this review helpful? Yes  No   Report this review
  • Anonymous

    Posted October 27, 2000

    Not for non-programmers

    I wanted to enhance my web design skills by learning JavaScript. This is not the book to purchase if you are a non-programmer. I found it very hard to understand and did not get a thing out of any of their examples.

    Was this review helpful? Yes  No   Report this review
  • Anonymous

    Posted September 6, 2000

    Beginners BEWARE!!!

    Do not buy this book if you are not already a programmer - as it will only discourage you. This book throws around programming terms and constant C and C++ references, as if the author wanted to show you that he is a 'real' programmer, and that this javascript thing is just a hobby for him. I don't have a grudge against O'Reilly - I realize that many people consider this to be the de facto standard javascript book - but if you are a web-designer that comes from a non-programming background as I do, this book will be useless to you.

    Was this review helpful? Yes  No   Report this review
  • Anonymous

    Posted April 17, 2000

    I Liked It

    This is a nice book if you already know C or C++ and are trying to learn JavaScript. The author frequently points out the similarities and differences between JavaScript and other languages. I found this helpful because I wasn't bored with things I already knew. The reference section takes up half of the book and seems well-organized and comprehensive. However, if you know nothing about programming, you will probably find this book boring or a little over your head. Don't waste your time on it unless you already know a language.

    Was this review helpful? Yes  No   Report this review
  • Anonymous

    Posted December 26, 1999

    A Good JavaScript Reference Book

    Offers a good starting place for beginner programmers and an excellent reference section for experienced programmers.

    Was this review helpful? Yes  No   Report this review
Sort by: Showing all of 14 Customer Reviews

If you find inappropriate content, please report it to Barnes & Noble
Why is this product inappropriate?
Comments (optional)