Simply JavaScript: Using the DOM

  Author:    Kevin Yank, Cameron Adams
  ISBN:    0980285801
  Sales Rank:    157108
  Published:    2007-06-01
  Publisher:    SitePoint
  # Pages:    350
  Binding:    Paperback
  Avg. Rating:    4.0 based on 15 reviews
  Used Offers:    10 from $21.98
  Amazon Price:    $26.37
  (Data above last updated:  2009-01-02 07:31:55 EST)
  
  
Sort customer reviews by:
  
Show All Reviews on Page      Hide All Reviews on Page
   
  
Simply JavaScript: Using the DOM
  
Everything you need to learn JavaScript from Scratch!

Packed with full-color examples, Simply JavaScript is a step-by-step introduction to programming in JavaScript the right way. Learn how easy it is to use JavaScript to solve real-world problems, build smarter forms, track user events (such as mouse clicks and key strokes), and design eye-catching animations. Then move into more powerful techniques using the DOM and Ajax.

  • Learn JavaScript's built-in functions, methods, and properties.
  • Easily integrate JavaScript in your web site.
  • Use JavaScript to validate form entries and interact with your users.
  • Understand how to respond to user events.
  • Create animations that bring your web site to life.
  • Start programming using the DOM and Ajax.

    Unlike other JavaScript books, modern best practices such as progressive enhancement, accessibility and unobtrusive scripting are used from the very beginning. All the code in the book is also cross-browser compatible and downloadable for free, so you can get started instantly!

  •                   Reader Reviews 1 - 17 of 17                 
      
      
    Review
    Date
    Review
    Rating(5 High)
    Review
    Helpful
    to:
    Customer Review Reviewer
    Info
    Permanent
    Link
    Reader Reviews Below Sorted by Newest First
    11-21-08 3 (NA)
    (Hide Review...)  Advanced topics are explained well
    Reviewer Permalink
    But lack of basics. For example,
    1. inheritance
    2. variable scope
    This book does explain some topics very well, like DOM, Event, even animation.
    This book title should be changed.
    (Review Data Last Updated: 2009-01-02 07:35:08 EST)
    11-11-08 4 (NA)
    (Hide Review...)  Very Didactic
    Reviewer Permalink
    This book was very helpful to me. The content is presented in a very didactic way.
    I would recommend this book to JS beginners like me. I enjoyed the sense of humor that the authors use to "spice" their explanations on something that for many could be quite difficult to "digest": coding.
    I don't know if these two guys also work as teachers, but if so, I have the feeling that they would be really good at it.
    (Review Data Last Updated: 2008-11-23 05:29:10 EST)
    09-12-08 1 0\1
    (Hide Review...)  This is not a book for beginners!!
    Reviewer Permalink
    This book simply sucks! IT doesn't explain why it happens, it just gives you something and then you should figure out next.

    I don't recommend this book to anyone serious in learning Javascript. Better buy Javascript: The definitive guide, I have read it already, and reading this book is like wasting time.
    (Review Data Last Updated: 2008-11-12 06:04:35 EST)
    08-10-08 3 1\1
    (Hide Review...)  Error - JavaScript does not have associtative arrays
    Reviewer Permalink
    These boys write in Chapter 2 that JavaScript has associative arrays but it is unfortunately a mistake. They show this snippet of code

    var postcodes = [];
    postcodes["Armadale"] = 3143;
    postcodes["North Melbourne"] = 3051;
    postcodes["Camperdown"] = 2050;
    postcodes["Annandale"] = 2038;

    and state that this is an array with 4 members. But unfortunately this array is empty, only has 4 properties. So, if you write

    alert (postcodes.length);

    you don't get 4, you get 0!
    (Review Data Last Updated: 2008-09-30 07:09:59 EST)
    08-07-08 2 (NA)
    (Hide Review...)  Maybe for someone else
    Reviewer Permalink
    Quite frankly, I couldn't make sense out of it. The examples don't seem to work, or they require knowing something that wasn't mentioned in the book. For a book entitled "Simply" I kind of expected that I would be able to write basic javascript by the time I had finished it. Sadly, this was not the case.
    (Review Data Last Updated: 2008-08-11 04:29:51 EST)
    06-14-08 2 0\1
    (Hide Review...)  Review for Simply Javascript
    Reviewer Permalink
    When i bought the book i had read from overviews of the book that all i needed to know was html/xhtml but so far, after 2 chapters, i havent been able to understand anything. i feel like im reading jiberish. im not sure and it maybe just my understanding but i have NO idea what its saying. try the book and maybe u may understand what its saying and whats going on. but if you do i would REALLY appreciate it if you can email me letting me know whats up with the book and if its really JUST my understanding. i was looking really forward to the book but unfortunatly it isnt as exciting as i was hopin it to be. :(
    (Review Data Last Updated: 2008-08-10 07:47:49 EST)
    03-24-08 3 1\2
    (Hide Review...)  Not the best for a complete beginner
    Reviewer Permalink
    The Sitepoint guys have great articles on their site and emails but I found this book very difficult to read. It didnt seem that the examples made sense, or flowed together to make sense.

    As Im pretty new to JS, adding that to my php work, I really had a difficult time understanding all the syntax - and that is made more difficult by now having clear, easy to follow examples.

    I cant and wont say that I wouldnt recommend this book because its not a bad book, I just feel that if you are as new to JS as I am, this might not be the best book to start with.
    (Review Data Last Updated: 2008-06-15 07:23:32 EST)
    01-08-08 5 (NA)
    (Hide Review...)  Awesome for a beginner
    Reviewer Permalink
    I love the fact that the book is easy to read and understand, particularly for a newbie to Javascript.
    (Review Data Last Updated: 2008-03-25 18:31:18 EST)
    01-05-08 4 (NA)
    (Hide Review...)  Excellent resource for learning JavaScript
    Reviewer Permalink
    I've been exposed to very little JavaScript, so I was very happy to get a review copy of this sent to me. First off, I'm a big fan of SitePoint's other books, and secondly I was looking forward to a book which would hopefully give me some good ground-up fundamentals. I'm not completely through the book yet, but I'm very impressed with it so far.

    The book starts out with some good software design tenets by emphasizing the need to keep content, style, and behavior separated out, then moves into some very basic steps for programming in JavaScript. The programming intro chapter starts out completely for beginners by laying out what variables are, what conditions and loops are, etc. Later chapters hit the DOM, JavaScript libraries, events, debugging, Ajax, and a few other topics.

    The authors do a very good job of laying out their topics, and I enjoyed their clear, enjoyable writing style. I think they do a pretty good job of discussing good development, and they're all over things like browser compatibility issues and other "Gotcha!" type issues. They've got a nice set of sidebars for tricks and tips as well as things to look out for.

    I also like that it's another SitePoint book with loads of color throughout. I'm not sure how SitePoint does it, but their continuing journey with all the color books is absolutely great to behold.

    On the downside, I'm not a fan of some of the example code I saw, which in several cases was more convoluted than good design would dictate (multiple nested for loops, return statements from other method calls being used as return values themselves, etc.). I also would have liked to see some discussion of testing via tools like Selenium or JsUnit.

    Overall I really like the book a lot. They talk standards, they talk cool tools like FireBug, they make some headway with good decisions about separation of code, content, and style.
    (Review Data Last Updated: 2008-01-09 08:01:14 EST)
    10-18-07 5 2\2
    (Hide Review...)  SIMPLY JAVASCRIPT is packed with plenty of easy details perfect for newcomers.
    Reviewer Permalink
    Any computer library or general-interest collection strong in Javascript needs SIMPLY JAVASCRIPT: EVERYTHING YOU NEED TO LEARN JAVASCRIPT FROM SCRATCH. Color examples accompany a step-by-step introduction to Java programming which teaches how to use JavaScript to solve real-world problems, track user events, and even design animations. From using Jax and the DOM to blending Java into an existing website, SIMPLY JAVASCRIPT is packed with plenty of easy details perfect for newcomers.

    Diane C. Donovan
    California Bookwatch
    (Review Data Last Updated: 2008-01-06 04:55:25 EST)
    10-04-07 1 (NA)
    (Hide Review...)  A disappointment
    Reviewer Permalink
    I've waited nearly a month for this book to arrive and was very disappointed when it did.

    The first page of the preface (effectively, the first page of the book) begins with inaccurate information about JavaScript (saying it is ten years old, when it's just about 13 years old).

    Continuing, the book then describes how & why to embed your JavaScript inside of a CDATA section, but shows the incorrect syntax for doing so.

    The book makes no mention of using client-side cookies nor does it discuss the for...in type of loop, which is so valuable.

    Despite a previous reviewer's opinion, this book is most certainly for beginners. It does not go in depth on any one topic and makes claims about the "right" way to do things that are not always "right".

    I also didn't care for the authors using "inside jokes and references" that many people will not get (Dr. Who references and "You guessed wrong. No, just kidding, you're right!").

    What really ticked me off is that this book reads like a non-stop advertisment for the author's web site.

    I'll be returning this book ASAP.
    (Review Data Last Updated: 2007-10-18 07:36:56 EST)
    08-08-07 4 (NA)
    (Hide Review...)  Getting it right from the start
    Reviewer Permalink
    This is a very good beginner's book on JavaScript. Kevin and Cameron show the proper way to use JavaScript: unobtrusively and standards-compliant, while still handling the idiosyncrasies of Internet Explorer.

    It doesn't cover everything, but it is a great start. The only thing I miss is some examples of mouse and keyboard event handlers, which are commonplace in many web "apps".

    My only gripe is the habitual (ab)use of XHTML markup served as tag soup, which is (unfortunately) all too common in SitePoint books. While it may be relatively harmless in most cases, dealing with JavaScript is not one of them. There should at least be some informal note explaining that there are some fundamental differences between HTML and XHTML that you should be aware of.
    (Review Data Last Updated: 2007-09-07 07:39:56 EST)
    08-08-07 5 4\4
    (Hide Review...)  Great book, but probably not for beginners
    Reviewer Permalink
    I began the book with very little knowledge of Javascript, although I am familiar with programming concepts and it has been great. I like the informal tone, and the examples are clear and easy to understand. It is not boring like most programming books. They emphasize keeping Javascript out of the html which adds a bit more complexity to the code than the old way of putting it right into the tags. This is good because it is standards compliant, but not as easy to learn.

    Be forewarned, this book starts with the basics but quickly jumps into the meat of Javascript. There is serious coding here, and it is not something you can read in a day. If you are not too familiar with coding principles like arrays, objects, or functions, it might be too much too fast. I would recommend JavaScript Demystified if you are beginner to scripting or programming because it spends a lot more time on basic concepts.

    Overall a great beginner-intermediate book on JavaScript.
    (Review Data Last Updated: 2007-10-05 07:33:50 EST)
    08-08-07 4 1\2
    (Hide Review...)  Getting it right from the start
    Reviewer Permalink
    This is a very good beginner's book on JavaScript. Kevin and Cameron show the proper way to use JavaScript: unobtrusively and standards-compliant, while still handling the idiosyncrasies of Internet Explorer. It doesn't cover everything, but it is a great start. The only thing I miss is some examples of mouse and keyboard event handlers, which are commonplace in many web "apps". My only gripe is the habitual (ab)use of XHTML markup served as tag soup, which is (unfortunately) all too common in SitePoint books. While it may be relatively harmless in most cases, dealing with JavaScript is not one of them. There should at least be some informal note explaining that there are some fundamental differences between HTML and XHTML that you should be aware of.
    (Review Data Last Updated: 2007-10-05 07:33:50 EST)
    08-08-07 5 (NA)
    (Hide Review...)  I finally get it
    Reviewer Permalink
    I have worked through about half of the book, and I am finally understanding JavaScript. I like the informal tone, and the examples are clear and logical and easy to understand. It is not boring like most programming books, I actually want to read through it instead of just use it as a reference book. I was so excited when this book was finally published because all the other JavaScript books I've tried have been dullsville.

    I've been designing sites for a while with wysiwygs like Dreamweaver, but got frustrated with their premade generic Javascript functions like those annoying alert boxes that pop up:
    "The textbox nameOfPerson cannot be null. Please respond."
    Now I know how tell the user what they need to fill out on the form in a more specific and pleasant way, using Javascript and CSS. I can make it as friendly as I want.

    Be forewarned, this book starts with the basics but is not simplistic (which is good). There is serious coding here, and it is not something you can read in a day. If you are not too familiar with coding principles like arrays, objects, or functions, you might need to reread sections in the book, try it out, take notes, and reference other sources. Think of it as a workbook. If you take it slow and really want to understand it, I think the book is good enough to learn from scratch as it says. If you are familiar with other programming languages and principles but want to learn JavaScript, I think it is ideal.

    My only constructive criticism is that there are occasionally topics that seem too complex or irrelevent or not explained in enough detail. Some sections explain how some part of JavaScript works, but not why you would use it on a web page. For instance it explains that sometimes it is handy to find every element on a page, but not why you would want to. Why would I ever need to find all the

    tags and change them? There might be a good reason, but it isn't explained. I guess these sections might be good as reference later as I become more skilled with it.

    Overall a great beginner-intermediate book on JavaScript so far. I'll keep reading.

    (Review Data Last Updated: 2007-08-09 07:42:02 EST)
    08-03-07 5 1\1
    (Hide Review...)  Great to finally know!
    Reviewer Permalink
    I've never had a bad go-round with any Site Point book but this is the best I've read yet. Let me first admit that I very rarely "write" my own js. As a designer/hoster/pseudo-developer I have little time to spend learning how to hand code programming languages from the ground up. I also rely on DW's Spry framework to make stuff easier.

    That being said, it is crucial that I at least understand what I'm looking at so I can make mods on the fly. This book makes learning js interesting, fun, and do-able. I think I finally understand the DOM, as I should, and I have this book to thank.

    Even if you don't hand code everything you need to at least understand the widgets/plugins you are using and this book does just that that and then some!

    Plus you don't have to be a geek like the two writers (just kidding guys) to understand even the most complex features.

    Another great job by the Site Point group!!!!!
    (Review Data Last Updated: 2007-08-08 07:38:13 EST)
    07-06-07 5 24\24
    (Hide Review...)  Solid Javascript - from beginner to advanced.
    Reviewer Permalink
    Simply Javascript by Kevin Yank and Cameron Adams lives up to the subtitle of Everything you need to learn Javascript from scratch. Javascript is a tricky subject to tackle. The Internet is full of Javascript snippets and code samples everywhere you look. Often times these code samples are less than satisfactory when you are addressing accessibility within your website. Many of the code samples contain outdated and proprietary code samples, making it a task to work out kinks and debug. The good news with this book is that they stick to a standard. All code used in this book uses object literal notation. Sticking to a coding style and format helps make this book an incredible read. Throughout this book you will learn the underpinnings of Javascript and how you can achieve different tasks.

    Learning Javascript from scratch can be a daunting task. After all, there are several libraries and free scripts that you can essentially download and plugin to your website. But what happens when things go wrong? What happens when you need to modify the script to fit your needs? Having a solid foundation and understanding of Javascript will help you as you begin to develop for your own needs. This book gently walks you through the steps you need to take to achieve that solid foundation.


    Chapter 1 starts off with a brief primer of unobtrusive Javascript and it's role in the three layers of the web. HTML is your content. CSS is your presentation. Javascript is your behavior. These three aspects need to be separate from one another and also co-exist at the same time. Gone are the days of inline event handlers and functions. Using the power of the DOM you can rest assured your HTML will be pure and your applications will work flawlessly without Javascript enabled.

    Chapter 2 spends some time setting up the foundation for beginners. This chapter walks you through statements, comments, variables and different variable types, conditions and loops, functions, and objects. Whew, that was a mouthful. This is where the standard of coding is introduced that will be used throughout the rest of the book. Things such as code indenting and formatting are touched on as well. This allows you to write clean code that is readable by you and other developers who may be working with your code. As stated earlier, all code uses object literal notation, and therefore this is explained in this chapter. A few examples are given and we are off to building some handy tools.

    Chapter 3 gives you the necessary road map. This chapter is devoted to traversing the Document Object Model. A few helper classes are shown here that will allow us to retrieve elements by class name, add class names to an element, remove class names from an element, and check for the existence of class names within in an element. These will be used extensively throughout the book and are placed in their Core object. In addition to being able to traverse by class names, there is also the list of standard elements such as getElementById and getElementsByTagName. With these powerful tools at our finger tips we can now begin altering our pages as deemed necessary. The example given here is one of striping table rows. For those who don't do this on the server side, this simple task allows you to stripe your rows via the DOM.

    Sure it's cool to add stripes to a table, but how can we do more? Chapter 4 is all about Events and the power they add to interacting with the DOM. The brief history lesson in this chapter helps us understand the different interpretations of different browsers and how we can use object detection to abstract these tasks into the Core object. Event Listeners and Event Handlers are both discussed in great detail. We move on to two working examples: Rich tooltips and Accordion. Rich tooltips are used to extract information from our title attribute and then apply them to a more stylish hover tooltip effect. Accordion allows us to save space on our pages by gradually showing the content as it is requested by either a click or keyboard event.

    Chapter 5 gets us moving even more. This chapter is devoted to Animation and is probably one of the more complex chapters of the book. We are introduced to two methods, setTimeout and setInterval. Working mainly with setTimeout we are able to achieve our animation effects. This chapter looks at the principles of animation and an example of path-based motion with a soccer ball. We then use our new-found knowledge to extend our tooltip to show after a specified time, and our accordion is given a nice slide effect. We simply extend the code from our previous chapter to make these things happen. This is a good example of the benefits of working with objects and decoupling inside of your Javascript.

    Chapter 6 gives use a few more tools to work with Forms. Forms are never easy to manipulate. Whether it be the style or the behavior. The beginning of the chapter starts with smaller scripts and examples of manipulating forms. This is done by specifying dependent fields and only showing them when necessary, and creating cascading menus from a select and it's optgroup. We then move on to some more advanced features for validation and creating a custom slider. These have been presented before in other areas, so nothing is really new in this area. However, this is all a part of understanding the bigger picture and the possibilities. It is about getting the creative juices flowing.

    Chapter 7 discusses the inevitable testing for errors and debugging your application. We walk through the different types of erros: syntax, runtime, and logic. With each of these code samples are given with errors. We then use the tools of the browsers to make sense of their often cryptic error messages. In order to debug Javascript there is an invaluable tool in Firebug, a plugin for the popular Firefox web browser.

    More interaction is still left as chapter 8 moves us to AJAX. Some very strong disclaimers are made as to when and where to use the right tool for the right job. Caution is also given in regards to assistive devices such as screen readers. With the warnings out of the way, we move to a some practical examples. The first is a small weather widget and the second is an extension to form validation.

    The book finishes off by looking too the future of Javascript. Discussions of Rich Internet Applications and their place inside of the web help to stimulate your mind as you think about the possibilities. Not only about building applications on the web, but also using Javascript for such things as Dashboard Widgets and even browser development. In the hands of responsible developers, the future looks exciting for Javascript.

    The Appendix is a very important part to this book, and I like its placement. The appendix goes through the Core methods used throughout the entire book. But why wait until the end of the book? Had this chapter shown up earlier it would have caused more confusion than necessary, and more explanation that necessary. As a reader you have the option to read this appendix first, but I felt it was well placed and covered thoroughly at the end of the book. By this point in the book you will have gained enough knowledge to dive in, whereas the beginning might have left you asking all the wrong questions.

    If you have been developing Javascript for any amount of time, then you are most likely aware of the array of libraries available to us. These include Prototype, Scriptaculous, jQuery, Dojo, MooTools, and YUI to name a few. Each chapter of this book ends with a discussion of the libraries and how they can be used to help achieve the different tasks. Some libraries can achieve some tasks, while others still take a little work. The authors give a fair coverage to the libraries but do not dwell on them as the end-all-be-all of Javascript. If anything, the author's stress that you understand your Javascript at the core and know why you are doing what you are doing. This book sticks to unobtrusive principles and doesn't take shortcuts. The authors strive to make sure the code is of high quality and compatible cross-browser, but they never take the easy way out. Things such as innerHTML are put away in favor of building the DOM on the fly. This adds to the overall excellent quality of this book. The excellent code coupled with beautiful illustrations make this book easy to take small chunks at a time.
    (Review Data Last Updated: 2007-08-03 09:46:59 EST)
      
                      Reader Reviews 1 - 17 of 17                 
      
      
      
      
      
      

    Because the data used to generate this site come from outside sources, VeryWellSaid.com cannot guarantee the completeness or accuracy of the data.
    Search VeryWellSaid™
    Google
    Web VeryWellSaid™
    New subjects are added every week.
    View Subjects Below by:
    * Top Selling
     (click category name, left)
    * Top-Rated Top Sellers
     (click 'Top Rated', right)
    In the news...  
    Dubai\UAE Top Rated
    Influenza\Bird Flu Top Rated
    Iraq Top Rated
    Supreme Court Top Rated
    All Books Top Rated
    Arts Top Rated
    Photography Top Rated
    Digital Photography Top Rated
    Digital Cameras Top Rated
    Biography Top Rated
    Business Top Rated
    Management Top Rated
    Marketing Top Rated
    Sales Top Rated
    Stocks Top Rated
    Bonds Top Rated
    Real Estate Top Rated
    Trading Top Rated
    Commodities Trading Top Rated
    Time Management Top Rated
    Starting A Business Top Rated
    Children's Top Rated
    Comics Top Rated
    Computers Top Rated
    PC Top Rated
    Mac Top Rated
    Programming Top Rated
    Design Patterns Top Rated
    .Net Top Rated
    C# Top Rated
    Vb.Net Top Rated
    Asp.Net Top Rated
    Java Top Rated
    Python Top Rated
    PHP Top Rated
    Perl Top Rated
    Javascript Top Rated
    Ajax Top Rated
    CSS Top Rated
    Open Source Top Rated
    SQL Top Rated
    Databases Top Rated
    Oracle Top Rated
    MySql Top Rated
    Sql Server Top Rated
    IIS Top Rated
    Apache Top Rated
    Linux Top Rated
    Windows Server Top Rated
    Project Management Top Rated
    HTML Top Rated
    UML Top Rated
    IT Certifications Top Rated
    Cisco Certifications Top Rated
    MCSE Top Rated
    MCSD Top Rated
    Cooking Top Rated
    Italian Cooking Top Rated
    Vegetarian Cooking Top Rated
    Wine Top Rated
    Engineering Top Rated
    Entertainment Top Rated
    Health Top Rated
    Nutrition Top Rated
    Dieting Top Rated
    Sex Top Rated
    History Top Rated
    Military History Top Rated
    British History Top Rated
    Middle East History Top Rated
    Land Battles Top Rated
    Naval Warfare Top Rated
    Air Warfare Top Rated
    9/11 Top Rated
    Terrorism Top Rated
    Home Top Rated
    Mortgage\Home Equity Loan Top Rated
    Cars Top Rated
    Car Buying Top Rated
    Sports Cars Top Rated
    Cat Top Rated
    Humor Top Rated
    Horror Top Rated
    Law Top Rated
    IP Law Top Rated
    Legal History Top Rated
    Fiction Top Rated
    Oprah's Book Club Top Rated
    Medicine Top Rated
    Cancer Top Rated
    Stroke Top Rated
    Heart Disease Top Rated
    Fertility Top Rated
    Diabetes Top Rated
    Pharmacology Top Rated
    Back Problems Top Rated
    Menopause Top Rated
    Thyroid Top Rated
    Pain Top Rated
    Organic Chemistry Top Rated
    Immune System Top Rated
    Mystery Top Rated
    Nonfiction Top Rated
    Outdoors Top Rated
    Running Top Rated
    Radio Control Models Top Rated
    Guns Top Rated
    Parenting Top Rated
    Divorce Top Rated
    Professional Top Rated
    Reference Top Rated
    Religion Top Rated
    Romance Top Rated
    Science Top Rated
    Physics Top Rated
    Chemistry Top Rated
    Astronomy Top Rated
    Psychology Top Rated
    Science Fiction Top Rated
    Sports Top Rated
    Teens Top Rated
    Travel Top Rated
    USA Top Rated
    Europe Top Rated
    France Top Rated
    Italy Top Rated
    England Top Rated
    China Top Rated
    All Books Arts Biography Click Here For An A-Z Index Of All 213 Best-Seller Subjects Business Children's Comics
    Computers Cooking Engineering Entertainment Health History Home Horror Humor Law Fiction Medicine Mystery
    Nonfiction Outdoors Parenting Professional Reference Religion Romance Science Sci-Fi Sports Teens Travel
    In Association with Amazon.com

    Cache miss
    (not cached)