Re: event is a void value within my function



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.
.



Relevant Pages

  • Re: Arabic Language not working in IE6.0, did before
    ... Re-install of AR W2ksp4. ... This posting is provided "AS IS" with no warranties, ... >>(E.G. it shows "AR" in the language bar). ... but now her Internet Explorer doesn't allow her to ...
    (microsoft.public.windows.inetexplorer.ie6.browser)
  • RE: Cannot print linked excel files
    ... What is your operation system and Internet Explorer version? ... Does the problem occur if you print a normal web page or just a HTML ... I am looking forward to your response. ... This posting is provided "AS IS" with no warranties, ...
    (microsoft.public.windows.inetexplorer.ie6.browser)
  • RE: SDK to convert DDRK version 3
    ... Is this a WSS site or a SPS site? ... Also you may try to check the internet explorer security. ... This posting is provided "AS IS" with no warranties, ...
    (microsoft.public.sharepoint.windowsservices)
  • RE: large fonts, background colours dont load in ie6sp1, xp2
    ... Does the problem occur if you create a new user account and login using the ... Internet Explorer. ... Select the Internet Options item. ... This posting is provided "AS IS" with no warranties, ...
    (microsoft.public.windows.inetexplorer.ie6.setup)
  • Re: DropDown Boxes for data entry of fixed fields
    ... Microsoft MSDN Online Support Lead ... This posting is provided "AS IS" with no warranties, ... DropDown Boxes for data entry of fixed fields ... I have attempted to add another BindingSource, for Country. ...
    (microsoft.public.dotnet.languages.csharp)