[Javascript] Setting event handlers on a dynamically created row
Peter Brunone
peter at brunone.com
Fri Mar 5 20:31:58 CST 2004
Okay, so maybe that was a silly question, considering the
availability of attachEvent() in later versions of Javascript, but I'd
still like to know how to point it to a function with parameters.
Thoughts?
-----Original Message-----
From: javascript-bounces at LaTech.edu On Behalf Of Peter Brunone
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