A
Assaf Lavie
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(); }
The handler needs to be able to process the event argument that is
passed to it. i.e. the actual handler should look like this:
function mouseDownHandler(e)
{
// use e.event_details_etc
}
How do I do this?
myNewElem = function(e) { alert(e); }
doesn't seem to work. it just says 'e' is undefined.
assign a handler to its onmousedown.
var myNewElem;
....
myNewElem = function() { do_somthing(); }
The handler needs to be able to process the event argument that is
passed to it. i.e. the actual handler should look like this:
function mouseDownHandler(e)
{
// use e.event_details_etc
}
How do I do this?
myNewElem = function(e) { alert(e); }
doesn't seem to work. it just says 'e' is undefined.