Hi Everyone,
Is there a way to send parameters to the function being added to an event with addEventListener.
I.E.
say you have this function
and I add it to an object.Code:function someFcn(i){ alert(i); }
Is there a way to send a parameter to someFcn.Code:someElement.addEventListener('focus', someFcn, false);
For Example I have tried this but it failed
Thanks for any help,Code:var someString = 'Hello World'; someElement.addEventListener('focus', someFcn(someString), false);
Nick






Bookmarks