473,324 Members | 2,257 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,324 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 4438
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
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
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...
1
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: 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...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
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
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...

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.