xAddEventListener(_children[i], "click", t("works fine!"), false)
You are right it is the xAddEventListener function where the problem is. The problem is this t("works fine!"). The line calls the function t expecting it to return a function name for the handler, for the event listener. This is what you should be doing:
function t(){ alert("works fine!")}xAddEventListener(_children[i], "click", t, false)
You shouldn't call a function when assigning it to an event listener (well you can, but it is more complex). All you do is put the name of the function you wish to be called when the event is fired. So you shouldn't put t() as if you were calling the function, you should just put t.Hope this helpsAdam