Interesting Javascript note of the day...
Jul. 12th, 2007 09:29 amWhen you're working with those nodeLists that are returned by 'getElementsByName' and the like, although they look like arrays they don't always act like them - for... in... doesn't work with them. Although they loop the correct number of times, the variable that's supposed to be populated with the current item is instead unknown.
And does anyone know why, although the name of element 'item' is 'item.name' and the id is 'item.id', that the class of that element is 'item.className'? That one always bites my ass.
And does anyone know why, although the name of element 'item' is 'item.name' and the id is 'item.id', that the class of that element is 'item.className'? That one always bites my ass.