[thelist] setAttribute(someevent) in IE?
liorean
liorean at f2o.org
Tue Jun 1 14:12:07 CDT 2004
sbeam wrote:
> 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.
Yeah - so call that function from within this function, then. Nothing prevents you from doing
document.getElementById('thelink').onclick=function(e){
e=e||window.event;
foo(arg1,arg2,arg3,...,arg8362);
};
--
David "liorean" Andersson
ViewStyles, ViewScripts, SwitchStyles and GraphicsInfo bookmarklets:
<http://liorean.web-graphics.com/>
Hangouts:
<http://codingforums.com/> <http://yourmusicforums.com/>
More information about the thelist
mailing list