angrytuna
05-12-2003, 04:35 PM
hello the forum!
I'm having a bit of difficulty determining who's responsible for throwing an event. I come from a Java background where you can use 'this' to determine the class responsible for calling a function. In javascript however, 'this' returns the Window object. If a button named 'bar' had an onclick handler which called 'javascript:foo()', I'd like in the body of foo to reference 'bar' (i.e. bar.name, bar.value, etc). Can anyone help?
~AT
I'm having a bit of difficulty determining who's responsible for throwing an event. I come from a Java background where you can use 'this' to determine the class responsible for calling a function. In javascript however, 'this' returns the Window object. If a button named 'bar' had an onclick handler which called 'javascript:foo()', I'd like in the body of foo to reference 'bar' (i.e. bar.name, bar.value, etc). Can anyone help?
~AT