How to call event as a function in mozilla

Giganews Newsgroups
Subject: How to call event as a function in mozilla
Posted by:  cyberwomb…@yifan.net (Jadow)
Date: 7 Jul 2003

I have a function that is used as an event for some parts of the
script.
i.e.
function somethind(e) {
    if (!e.currentTarget.documentElement ){
    ...
    }
}

I need to call this function manually (not by assigning it to an
event) Yet I cannot seem to deal with 'e'.
If I call it as: something(e); I get a 'not defined', if I ommit it I
get an undefined.
For some reason 'e' is undefined in the calling script. What decides
when it is available as an event object? and how can I resolve this
issue?

Thanks
Joshua

Replies