|
|
|||||||||
|
|||||||||
|
|||||||||
| |
|||
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Display Modes |
|
|
|
Stay one step ahead of the competition. Evaluate and give feedback
on some of the hottest web development tools on the market today.
Make your opinion heard! Click
Here
|
|
#1
|
|||
|
|||
|
Tooltips for DropDown Lists
I will start with exactly what I am trying to do, and then give details. In short, I need to add a ToolTip to a DropDown List on my web page.
Now, after looking through dozens of sites, I know that: a) DropDown Lists themselves do not have tooltips; "Title" will not work. b) Using an A Element will not work as well. So, I have started dabbling with JavaScript and creating my own ToolTip (I've hidden some details): <select id="MyList" onmouseover='javascript: ShowToolTip("X")' onmouseout='javascript: HideToolTip()> <option value="0">Off</option> <option value="1">Low</option> <option value="2">Med.</option> <option value="3">High</option> </select> <div id="DHTMLToolTip"></div> function ShowToolTip(ToolTipText) { var MyToolTip=document.all["DHTMLToolTip"]; MyToolTip.innerHTML=ToolTipText; var curX=event.clientX; var curY=event.clientY; var offsetX=-60; var offsetY=20; MyToolTip.style.left=(curX+offsetX) + "px"; MyToolTip.style.top=(curY+offsetY) + "px"; MyToolTip.style.visibility="visible"; return true; } function HideToolTip() { var MyToolTip=document.all["DHTMLToolTip"]; MyToolTip.style.visibility="hidden" return true; } There are two major problems: 1) The page containing this code is in a short frame (acting like a toolbar). As a result, the custom tooltip usually appears below the bottom border, making it unseen. In comparison, regular tooltips appear above everything, including the frame below. 2) The dropdown list always seems to appear above the custom tooltip. Thus, this solution does not seem to be the way to go. Does anyone know the solution to this? Also, while I am talking about tooltips, where can I find the default settings for tooltips? |
|
#2
|
||||
|
||||
|
wow, thats a good question, umm.. i will keep an eye out for a solution.
colton22 |
|
#3
|
|||
|
|||
|
Select and option elements can have titles. They work in Firefox, IE7, NS6+, and Opera 6+ support this but not in IE4-6/Win.
The default settings for tooltips are, in general, controlled by the operating system. Don’t use IE as your primary testing browser No, Internet Explorer did not handle it properly
__________________
Learn CSS. | SSI | PHP includes | X/HTML Validator | CSS validator | Dynamic Site Solutions IE7: the generation 7 browser new in a world of generation 8 browsers. Design/program for Firefox (and/or Opera), apply fixes for IE, not the other way around. |
|
#4
|
|||
|
|||
|
Have you considered Zorder? (I am not sure if, in DOM, is accessible)
|
![]() |
| Viewing: Dev Articles Community Forums > Programming > JavaScript Development > Tooltips for DropDown Lists |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|