Andrew Hayward shows how to add functions to JavaScript’s basic types - such as adding a ‘trim’ method that can be called on any string.

After my recent playings with JavaScript, it’s nice to see that Jon Udell has also been discovering that JavaScript can be written quite neatly also: I always thought Perl had a role to play on the desktop. And now that it has transfused its genes into JavaScript, it does.

I can see lots of similarities between JavaScript and Perl. Both are languages that are often written by people with no real programming experience, just to get a job done - usually involving web sites. A lot of the code in each isn’t written from scratch, but starts by taking some other code that almost [...]

When I read about this at diveintomark, my original parsing convinced me that it was about how to deal with unruly mailing lists about CSS (the CSS list I’m on is much too high volume for me to actually read much). Or at least something akin to MJD’s Mailing List Judo.
It actually turns out [...]

I had an neat “CSS” idea today that I’ve never actually seen anywhere: giving your <body> tag an ID or CLASS. Then, if you have a stylesheet that operates across your entire site, you can style the same element in different ways on different pages by setting up rules along the lines of:

A.cdlink [...]

Caveat Lector gives a clear explanation of DIVs and SPANs in HTML. I’ve had to explain these to people quite a few times. From now on I think I’ll talk about DIVs as BLOCKs. (Unless I’m explaining it to someone who’s writing their HTML in Template Toolkit…)

David Schontzler has a wonderful javascript fix for Internet Explorer’s broken CSS margin support. Now instead of working around this with a variety of CSS hacks, you can write completely valid CSS, drop this JS in, and everything will just work.
I hope other versions of this start appearing for all the other broken CSS [...]

Scott Andrew has a nice drag and drop window demonstration. Unfortunately there’s a nasty bug where Mozilla can’t drop the box, but the concept is good. There’s lots of little loose ends that he’s tossing out for other people to fill in, which is good too. This is already very neat, but it could be [...]

It seems that each of the various drag and drop event handlers only know about either the object being dragged, or the area into which it’s being dropped. Not both. This means that when dropping an object its receiver can’t know what’s arriving.
There is a dataTransfer object that can be seen by both ends, which [...]

Spend a few hours this afternoon playing with drag and drop in IE.
There seems to be two main approaches. At JavaScriptKit they use onmousedown and onemouseup to grab elements with class=draggable and then dynamically change their x/y position.
This creates a better visual effect than the official Microsoft approach, which uses a variety of new eventhandlers. [...]