[Javascript] Setting event handlers on a dynamically created row
Peter Brunone
peter at brunone.com
Fri Mar 5 20:20:12 CST 2004
Hi all...
If I create a row or a cell on a table, how do I assign
functions (specifically functions with parameters) to its event
handlers? Experience tells me that if I assign
rowTemp.onmouseover = thisFunction(this)
it will of course assign the *return value* from that function, which of
course is wrong. However, if I assign
rowTemp.onmouseover = "thisFunction(this)"
I would think it would be taken as a string, and not as a function. The
only other option I can imagine -- using eval() on the string I'm
assigning -- would seem to have the same result as the first. Can
anyone shed some light on what I'm supposed to do here?
Cheers,
Peter Brunone
More information about the Javascript
mailing list