Re: event is a void value within my function
- From: Thomas 'PointedEars' Lahn <PointedEars@xxxxxx>
- Date: Tue, 07 Mar 2006 23:24:36 +0100
James Black wrote:
I don't understand why there is no event passed to my function.
Most certainly because you are using Internet Explorer.
I am dynamically creating a link, and on mouseover I want a function to
be called. But, that function needs to get an event. This is for a
dropdown menu.
var select = document.createElement('a');
select.onmouseover = dropdownmenu;
function dropdownmenu(e){
}
The value of parameter e is void.
The value is `undefined'. There is no `void' value.
Any suggestion as to how to get it to work?
In the IE DOM, you have to use the `event' property of the `window' object
instead. Search the archives.
I don't want to have the html page define the link element, but it did
work when I did it that way.
function dropdownmenu(e)
{
if (e || (e = window.event))
{
// ... e ...
}
}
HTH
PointedEars
P.S.
In contrast to written letters, the "Re:" prefix in the Subject header
of Internet messages is used to indicate that the posting is a followup
to another posting. Since your posting is no followup but an OP, using
"re:" there is inappropriate.
.
- Follow-Ups:
- Re: event is a void value within my function
- From: James Black
- Re: event is a void value within my function
- References:
- re: event is a void value within my function
- From: James Black
- re: event is a void value within my function
- Prev by Date: Re: repost : scrolling tables
- Next by Date: Re: finding mouseposition in a layer
- Previous by thread: Re: event is a void value within my function
- Next by thread: Re: event is a void value within my function
- Index(es):
Relevant Pages
|