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
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
man, you are quite stubborn. have you test that in IE? It does not work. What you see in IE is the title attribute's value. Or the OP says that he can not use the title attribute for whichever reason.
hey my requirement is almost the same as what the code implements in http://dossett.org/11/No_onmouseover_for_options_in_IE/
..only thing now is can you people modify that code to make it work for just single select rather than multiple select?
hey my requirement is almost the same as what the code implements in http://dossett.org/11/No_onmouseover_for_options_in_IE/
..only thing now is can you people modify that code to make it work for just single select rather than multiple select?
Yes, but that code uses the title attribute to make it works somehow even in IE. Or, you have stated in your first post:
Originally Posted by maria_megha
I cannot use the title attribute option as its not compatible with my web browser
So?
By the way. How's that "as its not compatible with my web browser"? I have never heard about a browser which is incompatible with the title HTML attribute.
I mean to say title attribute doesnt serve the purpose of showing tooltips on each option items in a drop down menu when i use the it..but that program code implements it indirectly
I mean to say title attribute doesnt serve the purpose of showing tooltips on each option items in a drop down menu when i use the it..but that program code implements it indirectly
man, you are quite stubborn. have you test that in IE? It does not work. What you see in IE is the title attribute's value. Or the OP says that he can not use the title attribute for whichever reason.
I was tenacious in my pursuit of this idea because I knew I had seen it, before, and knew it was possible; I just couldn't remember _where_ I'd seen it. So, I did some Google searching and found a potential solution.
I was tenacious in my pursuit of this idea because I knew I had seen it, before, and knew it was possible; I just couldn't remember _where_ I'd seen it. So, I did some Google searching and found a potential solution.
^_^
I agree, but maybe it was a misunderstanding. You found a solution to make an OPTION to have a title (which was not the OP's desire, at least OP was confusing in the first post about that), but not to accept an event. I keep on my first statement: In Internet Explorer there is no possibility to attach an event to an OPTION element. IE simply takes the SELECT element as being the only element there, and ignores almost completely the OPTION as independent elements.
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?
Bookmarks