473,326 Members | 2,102 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,326 software developers and data experts.

safari select option onmouseover event

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 4439
acoder
16,027 Expert Mod 8TB
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
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 Expert Mod 8TB
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
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...
3
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...
4
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...
2
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...
2
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...
1
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....
2
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...
7
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...
5
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...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
1
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 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 former...

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.