On May 6, 4:40 pm, "scripts.contact" <scripts.cont...@gmail.com>
wrote:
> On May 6, 6:54 am, Assaf Lavie <assafla...@gmail.com> wrote:
>
> > I'm creating a HTML element dynamically using javascript and I want to
> > assign a handler to its onmousedown.
> > var myNewElem;
> > ...
> > myNewElem = function() { do_somthing(); }
>
> myelem.onmousedown=function(e){doSomething(e||even t)}
>
> function doSomething(e){
> alert(e)
>
> }
>
> works in ie,ff,op
Tried it and the argument is always undefined (e or event)...
|