472,782 Members | 1,479 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 472,782 software developers and data experts.

Safari popup menu problem

My simple popup menu code works in IE (Windows and Mac) but not in Safari.

I use a onmouseover ShowMenu function and a onmouseout HideMenu function.

Because Safari, unlike IE, recognises (correctly) text nodes within the
element nodes, the functions run twice as often. If the onmouseover is to or
the onmouseout is to a text node then the functions return false and do
nothing.

But because so many functions are being triggered, if the mouse is moved
quickly, some functions fail to operate and the popup menus either don't
appear of don't disappear.

You can try this at www.brilley.co.uk/TestMenusMac3.asp The popups are
positioned on screen for convenience. Hover on red, move to yellow. The
green popup will appear on Menu1 and Menu2. On Safari, if you move your
mouse up and down the yellow not over the text it works. If you move your
mouse over the text it fails sooner rather than later.

Any ideas very much appeciated.

Posted Via Usenet.com Premium Usenet Newsgroup Services
----------------------------------------------------------
** SPEED ** RETENTION ** COMPLETION ** ANONYMITY **
----------------------------------------------------------
http://www.usenet.com
Jul 23 '05 #1
3 2110
Roger Withnell wrote:
My simple popup menu code works in IE (Windows and Mac) but not in Safari. [snip] Any ideas very much appeciated.

[snip]

Sorry, no ideas, but I can confirm that it happens with Safari 1.0.3 on
Mac OS 10.2.8. I'm no fan of dynamic menus (I hate them - I can't stand
things that flash at me just 'cos I put the mouse near them).

I also have no idea about opimising DHTML menus, however I haven't
noticed this behaviour with other sites. Can you find another site with
the same type of menus you are trying to build? Does it happen there
too? I tried a couple with single level menus and the work fine, I can't
find any heirachial menus to test.

Cheers, Fred.
Jul 23 '05 #2
If you make sure all the elements that can fire an event have an ID, you can
alter the onmouseover and onmouseout functions so that they only work when
the object firing the event has an ID.

This will work if the nodes within the element (<p>aragraph, <a>nchor,
<font>, etc.) have no ID tag (as they are unlikely to).

If the problem is that the events fire repeatedly, then only react if you
see an ID.

If the problem is that the events don't fire, then recursively work through
the element's parents until you get to and element that does have an ID. The
following code will find the containing element of a text node (assuming the
text node that generated the event is 'element'):

while((!element.id || && element.parentNode && element.parentNode !=
element)
element = element.parentNode;

Hope this is helpful...

Chris.

"Roger Withnell" <ro*********@THISupperbridge.co.uk> wrote in message
news:41**********@127.0.0.1...
My simple popup menu code works in IE (Windows and Mac) but not in Safari.

I use a onmouseover ShowMenu function and a onmouseout HideMenu function.

Because Safari, unlike IE, recognises (correctly) text nodes within the
element nodes, the functions run twice as often. If the onmouseover is to or the onmouseout is to a text node then the functions return false and do
nothing.

But because so many functions are being triggered, if the mouse is moved
quickly, some functions fail to operate and the popup menus either don't
appear of don't disappear.

You can try this at www.brilley.co.uk/TestMenusMac3.asp The popups are
positioned on screen for convenience. Hover on red, move to yellow. The
green popup will appear on Menu1 and Menu2. On Safari, if you move your
mouse up and down the yellow not over the text it works. If you move your
mouse over the text it fails sooner rather than later.

Any ideas very much appeciated.

Posted Via Usenet.com Premium Usenet Newsgroup Services
----------------------------------------------------------
** SPEED ** RETENTION ** COMPLETION ** ANONYMITY **
----------------------------------------------------------
http://www.usenet.com

Jul 23 '05 #3
In article <41**********@127.0.0.1>,
"Roger Withnell" <ro*********@THISupperbridge.co.uk> wrote:
Any ideas very much appeciated.


Doesn't work in Netscape 7.2 on macos 10.2.6. The window contained the
red, yellow, and green boxes. None of the menus moved over.

In Safari 1.0, the submenus flashed. The submenues where on the screen
when the window came up. When I moved down the red boxes the submenus
moved over. Only on menus one and four did the submenus move over.
Other than that, things seemed to work.

Maybe you could use hvmenu at:
http://www.dynamicdrive.com/dynamici...menu/index.htm

Robert
Jul 23 '05 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

4
by: dpomt | last post by:
Hello, I am using the ASP.NET menu control and I have two issues when the page containing the menu is displayed in Safari on Mac OS X: 1) The menu is not dynamic. Why (it seems that Safari is...
1
by: Mark Rae | last post by:
Hi, Sorry for the repost - my ISP is having huge usenet problems at the moment... Following on with the problems of asp:Menu controls and Safari, I found the following article:...
0
by: johntig | last post by:
need help with a foxpro linked server problem i have some foxpro tables that are part of an app. i have created a mssql linkedserver and can select records from a .aspx page my problem is how...
0
by: erikbower65 | last post by:
Using CodiumAI's pr-agent is simple and powerful. Follow these steps: 1. Install CodiumAI CLI: Ensure Node.js is installed, then run 'npm install -g codiumai' in the terminal. 2. Connect to...
0
linyimin
by: linyimin | last post by:
Spring Startup Analyzer generates an interactive Spring application startup report that lets you understand what contributes to the application startup time and helps to optimize it. Support for...
0
by: erikbower65 | last post by:
Here's a concise step-by-step guide for manually installing IntelliJ IDEA: 1. Download: Visit the official JetBrains website and download the IntelliJ IDEA Community or Ultimate edition based on...
0
by: Taofi | last post by:
I try to insert a new record but the error message says the number of query names and destination fields are not the same This are my field names ID, Budgeted, Actual, Status and Differences ...
14
DJRhino1175
by: DJRhino1175 | last post by:
When I run this code I get an error, its Run-time error# 424 Object required...This is my first attempt at doing something like this. I test the entire code and it worked until I added this - If...
5
by: DJRhino | last post by:
Private Sub CboDrawingID_BeforeUpdate(Cancel As Integer) If = 310029923 Or 310030138 Or 310030152 Or 310030346 Or 310030348 Or _ 310030356 Or 310030359 Or 310030362 Or...
0
by: lllomh | last post by:
Define the method first this.state = { buttonBackgroundColor: 'green', isBlinking: false, // A new status is added to identify whether the button is blinking or not } autoStart=()=>{
0
by: lllomh | last post by:
How does React native implement an English player?
2
by: DJRhino | last post by:
Was curious if anyone else was having this same issue or not.... I was just Up/Down graded to windows 11 and now my access combo boxes are not acting right. With win 10 I could start typing...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.