Introduction of the book

As I promised before, I've now published the larger part of the Introduction of my book "ppk on JavaScript". Apart from some general notes, it introduces the eight example scripts that I use throughout the book. As you'll see, all these eight example scripts were written for real-world clients in order to earn real-world money.

The example scripts themselves are also online, and you can study them. The Introduction links to all of them. Since I refer to these example scripts throughout the book, I expect my readers to have a general idea of what they're doing and why.

I hope this pre-publication gives a better insight in the kind of book I've written.

Unfortunately the publication date has moved forward to 13 September (US). The rest of the world will have to wait about a month longer.

This is the blog of Peter-Paul Koch, web developer, consultant, and trainer. You can also follow him on Twitter or Mastodon.
Atom RSS

If you like this blog, why not donate a little bit of money to help me pay my bills?

Categories:

Comments

Comments are closed.

1 Posted by Matthew Crumley on 14 August 2006 | Permalink

It looks like the book should be really useful. I like the example scripts too.

2 Posted by Rasesh on 15 August 2006 | Permalink

I am glad it's available for pre-order, i just looked up the charges for international shipping and it's only $9, but it says 'import duties' extra. Would love to have this book in my hand :)

Good luck with it again!

3 Posted by Mark Wubben on 17 August 2006 | Permalink

Looking at the textarea example script I have to say I'm rather disappointed. There are a number of big issues with the code, for example with regards to unobtrusiveness (DOM 0 events?), semantics and DOM interaction (there are no guarantees as to the value of the maxLength attribute, for instance).

Also, I think I saw a similar comment from Lon here, but it's gone now?

4 Posted by Nigel Moore on 18 August 2006 | Permalink

I'm certainly interested in reading the reason for this code:
if (x[i].className != 'popup') continue;
x[i].onclick = openPopup;

rather than

if (x[i].className.indexOf('popup') != -1) {
x[i].onclick = openPopup;
}

5 Posted by Tino Zijdel on 18 August 2006 | Permalink

Nigel: that last example is also incorrect; suppose I have an element with class="someotherpopup" ;)

6 Posted by Lon on 18 August 2006 | Permalink

That is why it should read if (x[i].className.match(/\bpopup\b/))

Now you could still argue it's incorrect because a minus sign (-) is considered to be a \b in regexp talk. But I like it this way.

7 Posted by Tino Zijdel on 18 August 2006 | Permalink

I'd say the best way is to split className on whitespace and then checking for 'popup' in the resulting array. That is what I do in my classdealer 'lib': http://therealcrisp.xs4all.nl/meuk/classdealer.js

8 Posted by Sascha on 20 August 2006 | Permalink

The Edit Style Sheet Script is cool. With a little workaround i could use this for my new page to let user create ther own dashboard skin.

9 Posted by Nigel Moore on 21 August 2006 | Permalink

Tino: yes I see what you mean. I was more musing on the likelihood of multiple class names rather than similar class names. You're right in splitting className on whitespace and checking the array. But that's an added complexity that would only be required if the naming convention warranted it, I guess.

10 Posted by Simon on 24 August 2006 | Permalink

I wish that the translation to czech will appear also.