Arjan Eising

Pages

Feeds

You can subscribe to my feeds to get notified when I have written a new post, using RSS or Atom.

Categories

Archives

Archive for the 'JavaScript' category

JavaScript Get function

Blog friend Ben shared a nice JavaScript Get function. As the name says, it returns the wanted Get variable.

// Author: Benjamin Carlier, http://benjamincarlier.be/
var uri={
get:function(id){
return unescape(location.search.match('(?:\\?|\&)' + id + '=([^\&]*)')[1].replace(/\+/g, " "))}
}

To use it, only var term = uri.get('q'); is needed to put the search terms in the variable term.

Metaprogramming JavaScript

I haven’t had time to read everything, but Metaprogramming JavaScript looks great. I will definitely have a close look soon. The tutorial is more readable than his presentation slides, I think it was a really ‘technotalk’ presentation… not that I mind, though.

Metaprogramming is a technique to write code, by another block of code. In a more practical sentence: you’ll save time with it.

Review: ppk on JavaScript

Modern, accessible, unobtrusive JavaScript explained by means of eight real-world example scripts.

That’s what the cover says about ppk on JavaScript. I have got this book on my bookshelf for a while, but a few days ago I had to do some JavaScript work so this book was a nice tool working on that project.

The cover is quite right about the content of this nice book. Peter-Paul organized the book in the same way as his web site, QuirksMode. Good explanation of the browser support (e.g. the warning ‘Browser incompatibilities ahead’), very useful but this information will be out-dated in a year.

What I like about this book is the structure: just scripts you could write yourself, but with all the explanation about how it works, what to do and better: what not to do. All essential JavaScript ‘basics’ are explained using these scripts as example.

But I also have some points of criticism… what I disliked about the book is mostly the usage of colors. The only color used is the blue on the cover, but that’s it. Source of the scripts is printed in an unreadable gray color and headers would be much better recognizable when a different color was used.
I think this book better for people who know some JavaScript already. In my opinion it’s pretty good, so read to check out yourself…

Essential JavaScript Library

Robert Nyman developed the ‘ultimate’ JavaScipt library. Functions for classes, styles, attributes and a shorter version of document.getElementById();. There are two versions available: one with basic functions, and also one with some extra functions.
The best thing is in my opinion, the size of the documents. The basic one is only 1,16 kB and the extended only 2,75 kB.

next entries »