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

07-08-2004, 07: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:


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

07-08-2004, 08: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");