Errata
I tried to keep the book accurate, but mistakes inevitably made it in. Below is a list of errors and their corrections submitted by the astute readers of Getting StartED with Dojo:
Text Corrections
| Page | Error | Correction |
|---|---|---|
| 10 | myStr.toUpperCase() |
myStr = myStr.toUpperCase() |
| 25 | var namesArr = new [] |
var namesArr = [] |
| 27 | Description is backwards in “NotED” | Should read:
The double plus (++) operator in most programming languages when appended to a variable that contains a number will increase that number by one. NOte that when you use it as described before, the number is returned then is increased by one; if you prefix the variable with the double plus (as in ++i), the value is incremented then returned. By the same token, a double minus (–) can be used in the same manner, but it will decrement the value. |
| 44 | eventevent | event |
| 113 | height: "250px", |
height: "250px" |
| 122 | dojo.connect(btnFoo, “onclick”, btnFoo_click); | dojo.connect(foo, “onclick”, btnFoo_click); |
| 207 | dijit.form.TextArea | dijit.form.Textarea |
| 241 | The header reads dojo.delcare | dojo.declare |
Code Corrections
Utilize the below corrections if you are using dojo 1.5 later or if these example files did not work for you.
Click any of the filenames to download a zip archive of the corrected file and unzip the file to the appropriate location for the chapter.
| File | Line # | Error | Correction |
|---|---|---|---|
| keyboardEvents.html | 26 | event.charOrCode |
event.keyCode |
| animations.html | 29 | dojo.require("dojo.dnd.Target"); |
Delete this line |





I tried to run your code of ch4, keyboardEvents.html. It does not work.
Do you have updated version? Thanks
Hey Tony, sorry about the issues you are having. Is Firebug showing any kind of error?
I was just working on the Getting Stated with Dojo book, and ran across your note box on page 27, regarding the increment and decrement operators. Unfortunately, you got the description backwards.
base=1;
oldval=base++;
newval=++base;
Will assign 3 to newval and 1 to oldval.
Every so often this problem *does* come up.
You are absolutely correct. I’ll make note of that.
On page 207 it should read:
dijit.form.Textarea
The ‘a’ is NOT capitalized.
Thanks.
Hi!
I have the same problem like Tony said. In the Chapter 5 the keyboardEvents.html does not work(FF 3.6, IE 8). When I changed the event.charOrCode to event.keyCode in line 25 it works.
The biggest problem has come when I load the animations.html (Chapter 6). In FF 3.6 and Chrome 7 completly doesn’t work, and in Opera 10.62 and IE 8 just partially (the green drag and drop box and the list reordering works only). The only thing that Firebug shows is the following:
Could not load ‘dojo.parser’; last tried ‘./parser.js’.
I use Dojo v1.5 and I placed it to the right place (because the browser can load it). Can you or anybody help me?
Otherwise the book is great and I like it!
That’s odd! I’ll take a look at right now. Thanks for providing a detailed explanation of what’s wrong.
…if I copy the whole dojotoolkit folder into the ch6 folder, and I change the
code snippet to the following
var djConfig = {
parseOnLoad: true,
baseUrl:’dojotoolkit/dojo/’
};
Firbug wrote the following:
Could not load ‘dojo.dnd.Target’; last tried ‘./dnd/Target.js’
and Firefox Web Developer plugin throws errors for file:///C:/…/dojo/dnd/*.js (parser.js, stamp.js, Moveable.js, Mover.js, common.js, etc.), it said not well formatted (or something like that, i try to translate from hungarian
)
Thanks a lot!
Ok, I looked into the issues. For the keyboardEvents.html file, it looks if you are using a later version of Dojo (such as 1.5), a couple of things have changed.
keyboardEvents.html
Change line 26 from event.charOrCode to event.keyCode and that should make it work
animations.html
Simply delete the line that says “dojo.require(“dojo.dnd.Target”);”. This is no longer needed as it is a part of dojo.dnd.Source now.
Let me know if this works or doesn’t work for you.
Now works perfect in FF 3.6, IE 8, Opera 10.62 8 (on Win7).
Chrome doesn’t like it when the js src is from the localhost, it said: “XMLHttpRequest cannot load file:///C:/ch06/dojotoolkit/dojo/parser.js. Cross origin requests are only supported for HTTP.”, but when i changed it to http :// ajax.googleapis.com/ajax/libs/dojo/1.5/dojo/dojo.xd.js it has repaird.
Thanks you very much (especially the fast reply)!
@kszk, yeah it’s fine if you load from the CDN—it’s not fine if you load from a file:/// path
hi, I’ve been going through your book, got to chapter 9 and noticed that it abruptly ends on page 242. The next page is 291 which says “Appendix C: Plug-ins”. It doesn’t look like there are any pages torn out of the book, there’s just 50 pages missing. Did I get a defective book? Any way I can get the missing pages in a PDF or something like that?
thanks,
Keith
Hi Keith, sorry it took awhile for me to respond. It sounds like you got a defective book somehow. Unfortunately I cannot send you a PDF but you may want to either return it to the store for a replacement or contact Apress directly at support@apress.com. Sorry about that!