If this is your first visit, be sure to
check out the FAQ by clicking the
link above. You may have to register
before you can post: click the register link above to proceed. To start viewing messages,
select the forum that you want to visit from the selection below.

Using onMouseOut with Dropdowns

I have built a set of dropdown menus, and I make the layers visible using
<a href="url.htm" onMouseOver="showLayer('layername');"> with showLayer('layername')
being a function to make the correct layer visible using the right syntax
for the browser being used.

This works great.

My problem is how to make the dropdown go away. I cannot get the onMouseOut
handler to work with the <div> tags I am using for the layers. Cross-browser
compatibility is crucial.

Re: Using onMouseOut with Dropdowns

David,
1 idea...instead of using the onmouseout event use the onblur event. That
way if the page or the user moves the focus to another element it will register.
Onmouseout typically doesnt' work on a div tag because it sets a division
of the page not an actual element for an onmouseout event to occur.

If you need help specific to your code, include it on the next round.

Good luck and let me know if you have any questions.
Michael

"David" <007@007design.net> wrote:
>
>I have built a set of dropdown menus, and I make the layers visible using
><a href="url.htm" onMouseOver="showLayer('layername');"> with showLayer('layername')
>being a function to make the correct layer visible using the right syntax
>for the browser being used.
>
>This works great.
>
>My problem is how to make the dropdown go away. I cannot get the onMouseOut
>handler to work with the <div> tags I am using for the layers. Cross-browser
>compatibility is crucial.
>
>If anyone has any ideas, it would be much appreciated.
>
>Thanks in advance!
>
>David

Re: Using onMouseOut with Dropdowns

Hi David,
What I have done is use a timer on the page and that checks after every second
if the mouse is outside the menu area and if yes it hides the menu items.
I'm not sure if this will work for you.

Manoj
"David" <007@007design.net> wrote:
>
>I have built a set of dropdown menus, and I make the layers visible using
><a href="url.htm" onMouseOver="showLayer('layername');"> with showLayer('layername')
>being a function to make the correct layer visible using the right syntax
>for the browser being used.
>
>This works great.
>
>My problem is how to make the dropdown go away. I cannot get the onMouseOut
>handler to work with the <div> tags I am using for the layers. Cross-browser
>compatibility is crucial.
>
>If anyone has any ideas, it would be much appreciated.
>
>Thanks in advance!
>
>David