?
Solved

Select/Option versus onMouseOver in IE6 - lack of ability to do that

Posted on 2003-03-19
10
Medium Priority
?
3,841 Views
Last Modified: 2007-12-19
Hello - a first question here to this group:  I have read that Netscape 6.0 can do <SELECT><OPTION> based onMouseOver calls, and I realize that IE4 through 6 so far do not support this call.  But is there anyway in IE6 clients, to trap mouse movement and location, to emulate the onMouseover intercepts.  I know that the <SELECT> support onMouseOver, but I am actually talking about the <OPTION> list support.  The only thing I have found is that I can intercept onKeyDown and its related functions during list display.  I would like to make an OPTION list based mouseover display.  The code ideally would look like this:
<SELECT name=selectname><OPTION onMouseOver=mouseoverpopup() onMouseOut=closepopup()>items in list </OPTION><OPTION ..... </SELECT>.

So the mouse routine would be able to interogate which list member it is on top of and do some form of action.  

Thanks for advice in advance.

Steve Dickerson
0
Comment
Question by:msdickerson
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
10 Comments
 
LVL 46

Accepted Solution

by:
fritz_the_blank earned 500 total points
ID: 8168411
I know that you can easily capture the selectedIndex, but I don't know that you can do what you ask. This, for example, won't work:

<HTML>
<HEAD>
<META NAME="GENERATOR" Content="Microsoft Visual Studio 6.0">
<TITLE></TITLE>
</HEAD>
<BODY>
<FORM action="" method=POST id=form1 name=form1>
     <SELECT id=select1 name=select1>
          <OPTION></OPTION>
          <OPTION>A</OPTION onMouseOver="javascript: alert('a')">
          <OPTION>B</OPTION onMouseOver="javascript: alert('b')">
          <OPTION>C</OPTION onMouseOver="javascript: alert('c')">
     </SELECT>
</FORM>

</BODY>
</HTML>

Fritz the Blank
0
 

Author Comment

by:msdickerson
ID: 8168531
I have tried that technique and the <OPTION onmouseover> and just now the </OPTION onMouseover>, to no avail.  I have used the selectedindex when using onselect.  I am attempting to see if perhaps a window.event may be triggered when moving the mouse over the <OPTION> list, but I have not yet been able to capture one..

steve d
0
 
LVL 46

Expert Comment

by:fritz_the_blank
ID: 8168577
I think that all you can do is use the onChange() event of the select control to capture the index in question, i.e., this.selectedIndex.

Fritz the Blank
0
Get 15 Days FREE Full-Featured Trial

Benefit from a mission critical IT monitoring with Monitis Premium or get it FREE for your entry level monitoring needs.
-Over 200,000 users
-More than 300,000 websites monitored
-Used in 197 countries
-Recommended by 98% of users

 

Author Comment

by:msdickerson
ID: 8168708
That is about all I have been able to make work too.  I collected a script which does the onKeydown during option list display, but that obviously requires key strokes versus mouse movement.  My users will be using the mouse more than the keys, so Perhaps I can upload Netscape 6.0 to our companies machines.  Probably not... Anyway maybe IE will come out with a more complete support like NS6 has for this function.

thanks.
steve d.
0
 
LVL 46

Expert Comment

by:fritz_the_blank
ID: 8169020
Sorry that I couldn't have been more help, but sometimes the answer is that it just can't be done.

Fritz the Blank
0
 
LVL 2

Expert Comment

by:mikkolsoft
ID: 8169105
Maybe you make it as a "list" by setting the available  display length, e.g. <select size="2"> so that when the user "tries" to select the option it is actually already selected, which means you can use onChange to capture it. But that will change the look/purpose of the select box.

Anyway I never thought about this option is available and just realized this is only available to Netscape, too bad. Yeah IE *should* support this as it is part of the specification defined in HTML 4
http://www.w3.org/TR/html401/interact/forms.html#h-17.6 but then maybe IE will come up with a new event for it instead ;)

Mikkol
0
 

Author Comment

by:msdickerson
ID: 8169379
That is a good idea.  With the size set to more than 1, the dropdown does not take place, and either onchange or onkeypress would work.  I am testing that out now.

I caught a fleeting glimpse of something I was not familiar (just prior to my graphics driver on my PC looping), and it was something like alterbehaviour or something like that.  I read that I could change the methods or function on the fly of an Object, like OPTION lists.  I did not get a chance to further look into it due to the automatice reboot of my PC.  Anyway it was something like alter.behaviour.Object=something to change.  I was trying to see if that idea would make it possible to get mouse activity capturable in options lists.  Anybody every hear of that sort of stuff, and if so have any idea if it has any potential of adding a new behaviour to options lists?

thanks.

steve
0
 

Author Comment

by:msdickerson
ID: 8169467
That is a good idea.  With the size set to more than 1, the dropdown does not take place, and either onchange or onkeypress would work.  I am testing that out now.

I caught a fleeting glimpse of something I was not familiar (just prior to my graphics driver on my PC looping), and it was something like alterbehaviour or something like that.  I read that I could change the methods or function on the fly of an Object, like OPTION lists.  I did not get a chance to further look into it due to the automatice reboot of my PC.  Anyway it was something like alter.behaviour.Object=something to change.  I was trying to see if that idea would make it possible to get mouse activity capturable in options lists.  Anybody every hear of that sort of stuff, and if so have any idea if it has any potential of adding a new behaviour to options lists?

thanks.

steve
0
 
LVL 16

Expert Comment

by:jaysolomon
ID: 10148925
No comment has been added lately, so it's time to clean up this TA.
I will leave the following recommendation for this question in the Cleanup topic area:

Accept: fritz_the_blank {http:#8168411}

Please leave any comments here within the next seven days.
PLEASE DO NOT ACCEPT THIS COMMENT AS AN ANSWER!

jAy
EE Cleanup Volunteer
0

Featured Post

Free Tool: ZipGrep

ZipGrep is a utility that can list and search zip (.war, .ear, .jar, etc) archives for text patterns, without the need to extract the archive's contents.

One of a set of tools we're offering as a way to say thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

In my daily work (mainly using ASP.net), I need to write a lot of JavaScript code. One of the most repetitive tasks I do are the jQuery Ajax calls. You know: (CODE) I don't know if for you it's the same, but for me is soooo tedious to write the …
JavaScript can be used in a browser to change parts of a webpage dynamically. It begins with the following pattern: If condition W is true, do thing X to target Y after event Z. Below are some tips and tricks to help you get started with JavaScript …
The viewer will learn the basics of jQuery, including how to invoke it on a web page. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery.: (CODE)
The viewer will learn the basics of jQuery including how to code hide show and toggles. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery…
Suggested Courses

743 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question