473,932 Members | 2,118 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

safari select option onmouseover event

4 New Member
It seems, at least as far as my tests show, that Safari does not fire onmouseover for select options.

with the code below, I can get all the messages in Firefox, but none in Safari.
If I attach a handler for the onmouseover to the select element (the part currently commented out) I can get the first mouseover of the select element, but not any additional ones. Again, in Firefox, I get all the messages, although they are handled by the selectorMouse function.

Is this familiar to anyone, and are there any work-arounds?

thanks in advance,
Linus

Expand|Select|Wrap|Line Numbers
  1. <html>
  2.     <head>
  3.         <title>Woohoo</title>
  4.         <script language="javascript" type="text/javascript">
  5.             function selectorMouse(evt, selector) {
  6.                 document.getElementById("msg").innerHTML="selector:"+evt.target.value;
  7.             }
  8.             function optionMouse(evt, option) {
  9.                 document.getElementById("msg").innerHTML="option:"+evt.target.value;
  10.             }
  11.         </script>
  12.     </head>
  13.     <body>
  14.         <div id="msg">&nbsp;</div>
  15.         <select id='selector' name='selector' > <!-- onmouseover="selectorMouse(event, this)" -->
  16.             <option id="option1" name="option1" value="op1v" onmouseover="optionMouse(event, this)">Option 1</option>
  17.             <option id="option2" name="option2" value="op2v" onmouseover="optionMouse(event, this)">Option 2</option>
  18.             <option id="option3" name="option3" value="op3v" onmouseover="optionMouse(event, this)">Option 3</option>
  19.         </select>
  20.     </body>
  21. </html>
Mar 23 '09 #1
3 4471
acoder
16,027 Recognized Expert Moderator MVP
I don't think this works in IE either. Either create your own DHTML select object (simply not worth the effort) or just get the selected element and forget the option element mouse-over.
Mar 28 '09 #2
linuskamb
4 New Member
yes, I had managed to fool myself regarding IE. I ended up using a CSS-based drop-down menu approach, as I needed to have the hover over the sub-items notice.

thanks for the reply.
Mar 31 '09 #3
acoder
16,027 Recognized Expert Moderator MVP
Since you needed it, that's the most reliable, cross-browser solution. Glad you got a working solution.
Apr 1 '09 #4

Sign in to post your reply or Sign up for a free account.

Similar topics

2
6447
by: Joachim Bauer | last post by:
I'm using the code below to display a menu that opens when the mouse goes over the main menu item (try it in your browser to understand the behaviour). It uses "position:absolute" and a switch between "display='none'" and "display=''". However the problem is that - in Internet Explorer 6 the dropdown (<select>...) always hides the menu
3
2165
by: Roger Withnell | last post by:
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...
4
3876
by: Marek Mänd | last post by:
This seems an IE issue only: 4253 bytes testcase: http://www.hot.ee/idaliiga/testcases/ieselect/bnlinkingselectinmsie.htm Can one have 1) a mouseover/mouseout element on TBODY 2) change in thoise event handler background colors 3) have a specified heighted SELECT element, that doesnt flicker when the event handlers are get called.
2
1748
by: Ilpo | last post by:
Hi! Is it possible to open DHTML menu from a select box option? I need a select box which shows a new sub-menu when pointing the mouse over an option. Does anyone know is this possible? The option onMouseover doesn't seem to work. Thanks for any help!!
2
1633
by: jascraig | last post by:
Here's my dilemma. I'm working with a frameset with 3 frames (header,content,control). My control frame contains a select list with buttons for next and previous. When the next button is pushed the select list moves to the next option and the content frame changes to the next URL, and a page number is updated on the header. The code I have now works great on NS 7 and FF1. When I test it in IE, the select box updates then immediately...
1
6117
by: mike.thirlwell | last post by:
Hi there, I've created the following demo to illustrate a problem I've been having with Safari (2.0.3 in my case) firing onmouseout events when the onmouseover event should be being triggered. Is this a well documented bug and, if so, what are the workarounds? Demo here: http://www.cbjdigital.com/test.htm Source:
2
17091
by: cbjewelz | last post by:
Hey all. So I'm having problems with cross browser alignments. I'm looking at Safari and Mozilla Firefox. I develop in Safari and so it looks perfect there however in Firefox my vertical alignments and div widths are off. It's as if firefox has a different definition of a pixel than safari. Here is the url: http://theprize.chemouni.com/testing.php. When you select the Option from the pull down, the first part of the form appears. Then when...
7
33706
by: prash.marne | last post by:
Hello, I have a simple form <form method="POST"> <select name="activity"> <option value="0">None</option> <option value="M" onclick="popup_onclick()">Select Multiple</option> <option value="1">Kayaking</option>
5
5273
by: jeddiki | last post by:
I want to change the default background color of my select box. Here is the problem: Link to form with color select Notice in the color selector, the background color that I have given it it the option statement changes on hover to a blue/gray. Instead of background color change I would like the text to BOLD. So on hovering over green, the text "green" goes green (bold) but
0
9954
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
11076
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
11259
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
9843
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
8199
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
6059
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
6267
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
2
4432
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
3486
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.