@ tsuji and AvarPentel: thanks a lot, now the example works :)
The "real" program still has some problem, but i'll try to figure out that myself!
Thanks to all again!
Thanks for the fast reply :)
I've just tested my script change the setAttribute line with
td.onclick = aa;
but, in this way, the script doesn't work at all ( firefox and IE).
And, even if it would have worked, i'd have a problem with "this"...
Hi guys, I've a problem using setAttribut and event. Let me explain in detail: I have to create a table with js, and set an onClick event on every cell, so that a function with argument "this" is executed every time the user click on a table cell.
To do so, I've coded something like:
<html>...
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.