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
Something else to consider ...
Quote:
Originally Posted by
maria_megha
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
Quote:
Originally Posted by
WolfShade
Not as neat as link, but maybe you could modify this attempt at a "Fake Selectbox"
Code:
<html>
<head>
<title>Fake Select Box</title>
<script type="text/javascript">
// For:
function showImg(info) {
document.location.href = info;
}
</script>
<style type="text/css">
li { list-style-type: none;
border:1px solid blue;
background:white;
}
li:hover { background:yellow; }
.imgPic { height:20px; width:20px; }
</style>
</head>
<body>
<div style="height:134px;width:100px;overflow:auto">
<li><a href="http://www.nova.edu/hpd/otm/pics/4fun/Faces.html">Select</a></li>
<li title="Exhausted">
<img src="http://www.nova.edu/hpd/otm/pics/4fun/11.jpg" onclick="showImg(this.src)" class="imgPic">
1st </li>
<li title="Confused">
<img src="http://www.nova.edu/hpd/otm/pics/4fun/12.jpg" onclick="showImg(this.src)" class="imgPic">
2nd </li>
<li title="Ecstatic">
<img src="http://www.nova.edu/hpd/otm/pics/4fun/13.jpg" onclick="showImg(this.src)" class="imgPic">
3rd </li>
<li title="Guilty">
<img src="http://www.nova.edu/hpd/otm/pics/4fun/14.jpg" onclick="showImg(this.src)" class="imgPic">
4th </li>
<li title="Suspicious">
<img src="http://www.nova.edu/hpd/otm/pics/4fun/15.jpg" onclick="showImg(this.src)" class="imgPic">
5th </li>
<li title="Angry">
<img src="http://www.nova.edu/hpd/otm/pics/4fun/21.jpg" onclick="showImg(this.src)" class="imgPic">
6 </li>
<li title="Hysterical">
<img src="http://www.nova.edu/hpd/otm/pics/4fun/22.jpg" onclick="showImg(this.src)" class="imgPic">
7 </li>
<li title="Frustrated">
<img src="http://www.nova.edu/hpd/otm/pics/4fun/23.jpg" onclick="showImg(this.src)" class="imgPic">
8 </li>
<li title="Sad">
<img src="http://www.nova.edu/hpd/otm/pics/4fun/24.jpg" onclick="showImg(this.src)" class="imgPic">
9 </li>
<li title="Confident">
<img src="http://www.nova.edu/hpd/otm/pics/4fun/25.jpg" onclick="showImg(this.src)" class="imgPic">
10 </li>
</div>
</body>
</html>
Several options included with a bit of study...
Good Luck!
:)
tooltips for option items in a single select box
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?
title attribute not showing tooltips
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