Solved

How to get tooltip for a HTML DropDown options (Select box) ?

Posted on 2004-08-25
3
855 Views
Last Modified: 2008-01-09
I have a select box of limited width. The names of the options are longer than the available select box width. How can I get the full option names appearing as tooltips, when going over the options...
0
Comment
Question by:hyder
3 Comments
 
LVL 53

Accepted Solution

by:
COBOLdinosaur earned 250 total points
ID: 11892361
Mozilla based browsers only:

<option title="your tooltip"> option1 </option>

For IE there is nothing.  If you have to have the functionality for IE, you have to build a custom DHTML control and script the behaviours of a select.

Cd&
0
 
LVL 15

Expert Comment

by:joeposter649
ID: 11896627
Maybe option group's would help you here...
http://www.w3schools.com/tags/tag_optgroup.asp
0
 

Expert Comment

by:Heama
ID: 12255969
<HTML>
<HEAD>
<TITLE>Radhika's ........ :)</TITLE>
<style>
a.info{position: relative;z-index:24;background-color:#ccc; color:#000; text-decoration:none}
a.info:hover{z-index:25}
a.info span{display: none}
a.info:hover span{display:block;
    position:absolute; top:2em;left:2em; width:10em;
    border:1px solid #000; background-color:#FFFFCC; color:#000;text-align: center}
   
</style>
<SCRIPT>
function mOver()
{
      document.all.sp.innerHTML = document.a.s.options[document.a.s.selectedIndex].text;
}
function mOut()
{
      document.all.sp.innerHTML = "";
}
</SCRIPT>
</HEAD>
<BODY>
<form name=a>
<a class="info" href="javascript:void(0)">
<select name=s onmouseover="mOver()" onmouseout="mOut()">
      <option value=1>one</option>
      <option value=2>two</option>
      <option value=3>three</option>
</select><span id=sp></span></a>
</form>

</BODY>
</HTML>
0

Featured Post

DevOps Toolchain Recommendations

Read this Gartner Research Note and discover how your IT organization can automate and optimize DevOps processes using a toolchain architecture.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
SharePoint 2013 Searchbox Branding 11 81
WIX Redirect 1 48
Advice on Xojo as a development tool over VB. 4 57
compact pure CSS Read More Toggle 4 72
Using SQL Scripts we can save all the SQL queries as files that we use very frequently on our database later point of time. This is one of the feature present under SQL Workshop in Oracle Application Express.
Developer portfolios can be a bit of an enigma—how do you present yourself to employers without burying them in lines of code?  A modern portfolio is more than just work samples, it’s also a statement of how you work.
The viewer will learn how to look for a specific file type in a local or remote server directory using PHP.
Any person in technology especially those working for big companies should at least know about the basics of web accessibility. Believe it or not there are even laws in place that require businesses to provide such means for the disabled and aging p…

832 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