-
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.
If anyone has any ideas, it would be much appreciated.
Thanks in advance!
David
-
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
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
Forum Rules
|
Top DevX Stories
Easy Web Services with SQL Server 2005 HTTP Endpoints
JavaOne 2005: Java Platform Roadmap Focuses on Ease of Development, Sun Focuses on the "Free" in F.O.S.S.
Wed Yourself to UML with the Power of Associations
Microsoft to Add AJAX Capabilities to ASP.NET
IBM's Cloudscape Versus MySQL
|
Bookmarks