Snooksurvey

SnookSurvey #2: To Link or Not?

06 Jun 2007

The discussion on this should prove interesting. So, you're ajaxifying an interface and you've got some JavaScript injecting new elements into the DOM for the purpose of enabling interaction. For example, you've got an FAQ with a series of questions and answers. Questions are marked up with H2's (or maybe you prefer definition lists for your FAQ, whatever, this is just for argument's sake). You hi...

Read it all »

SnookSurvey Recap: Element Attributes in JavaScript

06 Jun 2007

So, in the first edition of this survey I asked whether people thought they should use element.attribute or element.getAttribute('attribute'). In the end, it came out pretty much 50/50 although some people tended to switch depending on the situation since some scenarios present some gotchas. It took until the 20th comment before someone mentioned the fact that, indeed, element.attribute is part o...

Read it all »

SnookSurvey: Element Attributes in JavaScript

24 May 2007

I'd be interested to hear what the general consensus is on something. Consider this like a SimpleQuiz but not really simple and not really a quiz. More like a survey. SnookSurvey. And survey says... I've got an element that I'm working with in JavaScript and I wish to get and set an attribute. How do you do it? Using element.attribute E.g. mylink.src = '/path/to/image.gif' Using element....

Read it all »