473,396 Members | 1,767 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,396 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 2139
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: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...

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.