[thelist] setAttribute(someevent) in IE?
sbeam
sbeam at syxyz.net
Tue Jun 1 13:36:36 CDT 2004
On Tuesday 01 June 2004 02:16 pm, liorean wrote:
> In cases where you want to send it an argument,
> document.getElementById('thelink').onclick=function(e){
> e=e||window.event;
> /*code to run when the event triggers*/
> };
thanks - but what if foo() is actually a really complicated function and
is also called by events on other elements? Basically I really want to
have a single function definition.
I tried the old
==
elem['onclick'] = new function() { foo(arg) };
==
but this actually _calls_ foo(arg) on page load. hmm.
--
# S Beam - Web App Dev Servs
# http://www.onsetcorps.net/
More information about the thelist
mailing list