DOM Scripting comments: ’Tis the season for DOM Scripting http://domscripting.com/blog/display/39 24ways.org has finished its month of articles and DOM Scripting was well represented. en Alex http://domscripting.com/blog/display.php/39#comment220 Thanks. The book is really amazing, you rock on so many levels for having written it. And for keeping this blog (it’s a great resource) and for actually responding to people’s comments. Very cool. Incommunicably so…

Unfortunately, the script still isn’t working, but at least it’s a step closer to it. I’m starting to wonder about scriptaculous…

]]>
Fri, 13 Jan 2006 04:37:39 GMT
Jeremy Keith http://domscripting.com/blog/display.php/39#comment219 getElementsByTagName will return a list of elements, not a single element. Right now, your variable sliderLink is an array.

If you’re trying to attach an event to a link with the id "slideup", you don’t need the extra step with getElementsByTagName. Just attach the onclick event to the variable slider - which refers to document.getElementById("slideup").

]]>
Fri, 13 Jan 2006 01:44:44 GMT
Alex http://domscripting.com/blog/display.php/39#comment218 I was one of the people who commented on the scriptaculous article over at 24ways, and I’m reading the awesome book as we speak. I’ve been trying to hook up scriptaculous with unobtrusive javascript, but I’m not quite there (and I don’t know quite enough about javascript to actually make the final connection about whatever stupid mistake I’m making).

Right now, I have this:

function rawr() { var miniabout = document.getElementById(‘miniabout’); var slider = document.getElementById(‘slideup’); var sliderLink = slider.getElementsByTagName(‘a’); sliderLink.onclick = function() { Effect.SlideUp(‘miniabout’, {duration:1.0}); return false; } }

with the intended function: when a user clicks on the link with id "slideup" the slideup effect is triggered on the div with the id "miniabout." I’m launching the whole thing using addLoadEvent, like you suggest in your book. It seems like this should work. What am I doing wrong?

I understand that you don’t have infinite time to answer stupid questions like this, but you know, it’s worth a shot.

]]>
Fri, 13 Jan 2006 01:37:17 GMT
elsakawai http://domscripting.com/blog/display.php/39#comment206 Congrat! I need to get one!

]]>
Fri, 30 Dec 2005 20:37:58 GMT