adding a tooltip for each option item in drop down menu
I have a scenario where I show a drop-down-with-few-items in a JSP page, to the user.
The length of few options in the drop down is greater than that of the drop down's, hence our requirement is to show the hovered (not selected) option as tooltip for user's convenience. I cannot use the title attribute option as its not compatible with my web browser
According to w3schools.com, OPTION does have an onMouseOver event.
According to the standards there are many things. But the bitter truth is that IE does not follow the standards entirely. In fact no browser follows the standards entirely. Before saying that something exists, you should have simply tested it. IE does not accept events on OPTION elements, at least not up to the version 8 included. It is as simple a that.
The only solve could be to create, graphically, elements which look like list boxes, but made from divs, and controlled by javascript functions. But this could be a much too intricate solution for the OP.
hey then could you show with 1 simple example using div and graphical elements.. or some alt way to show option elements whic cannot be shown fully in the list box
okies so onmouseover event doesnt work for option elements in IE..i want to display tooltips for each option element..I googled and found that using title attribute is the solution for firefox but not for IE..SO now what do you suggest to make possible for a tooltip to appear on each option element?
okies so onmouseover event doesnt work for option elements in IE..i want to display tooltips for each option element..I googled and found that using title attribute is the solution for firefox but not for IE..SO now what do you suggest to make possible for a tooltip to appear on each option element?
So what were you thoughts on post #7? It creates a fake dropdown that does allow the use of title tooltips without using the <option> tags. You could remove the title settings altogether to use a hover technique to display a more lengthly pop-up description (tooltip). You can decide how many choices to initially display with the CSS setting of the <div> tag. Also allows the graphic that you cannot put into the drop down selection options. Might be a work-around until your company arrives in the 21st century.
I just upgraded my IE TO VERSION 8..and tried the following piece of code in IE 8..it dint work(dint show tooltip)..but it works perfectly fine if i put it in firefox..
I just upgraded my IE TO VERSION 8..and tried the following piece of code in IE 8..it dint work(dint show tooltip)..but it works perfectly fine if i put it in firefox..
...
now whats the remedy for this?
Perhaps when you have a 500 pound gorilla in the room, you do what it wants
or leave the room.
yes.I solved by removing the multiple attribute of select element..bu the next problem with that code is it shows select size=5..so as a result it displays each option items..i got atleast 20-30 option items.So i want a select of size=1..When i make that change tooltips dont appear...
Wait a minute. Do you use IE6? Because title attribute works OK since IE7... If so, forget about that. IE6 is the worst browser ever. And its share market drops every day. Even Microsoft makes huge efforts to get IE6 out of this world. You should not code for IE6 anymore.
Bookmarks