QuirksBlog - JavaScript techniques

Atom RSS 1.0 RSS 2.0 RSD RDF

Main navigation:

Category archives:

Monthlies:

Notes about JavaScript coding techniques.

2 September 2005

XMLHTTP notes: responseXML and IE bug

Permalink | JavaScript techniques | 10 comments

Currently I'm working on debugging a very complicated script that's supposed to xmlhttprequest a few pages to be shown in a "Dashboard". I already wrote about another aspect of the project in my previous entry, but now that I'm concentrating on the XMLHTTP aspects of this project I found out a few very interesting things about responseXML, as well as a complicated Explorer bug.

This entry treats these two points, since they should be documented.

Continue reading...

30 August 2005

addEvent() considered harmful

Permalink | JavaScript techniques | 36 comments

Back in 2001 Scott Andrew LePera published the cross browser event handler script addEvent(), which was subsequently copied, revised, and used in many, many websites. I never used it, because I felt — and feel — it is wrong to assume that the W3C addEventListener and the Microsoft attachEvent methods are the same. They aren't, and the slight but important difference can trip up the unwary web developer.

Today I found excellent evidence that addEvent() can be harmful if it's used without intimate knowledge of the differences between the W3C and Microsoft event registration models.

Continue reading...