Want to protect your cyber security and still get fast solutions? Ask a secure question today.Go Premium

x
?
Solved

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

Posted on 2003-03-19
10
Medium Priority
?
3,855 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
9 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
Concerto's Cloud Advisory Services

Want to avoid the missteps to gaining all the benefits of the cloud? Learn more about the different assessment options from our Cloud Advisory team.

 

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

What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

Question has a verified solution.

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

I've been trying to accomplish this for a while and it just struck me yesterday how to accomplish this task. I have done searches all over the internet looking for ways to email pages from my applications and finally I have done it!!! Every single s…
Nothing in an HTTP request can be trusted, including HTTP headers and form data.  A form token is a tool that can be used to guard against request forgeries (CSRF).  This article shows an improved approach to form tokens, making it more difficult to…
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

580 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