...

View Full Version : Does anyone know what the script on this link is supposed to do?



SpiritualStorms
07-08-2004, 06:34 AM
I went to a link to look up a method, and well, lets just say, the code does not work. Here's the link:

http://www.mozilla.org/docs/dom/domref/dom_el_ref31.html#1028304

I copied, and pasted the code, and well, it doesnt seem to do squat.

neofibril
07-08-2004, 07:02 AM
It attaches an onclick event to the table, which calls a function that changes the innerHTML of "td2"...

For Internet Explorer, the equivalent method would be: el.attachEvent("onclick", l_func);

There's an unscoped variable in the example that will cause an error in IE... it should be var t2 = document.getElementById("t2");



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum