• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 1465
  • Last Modified:

Tooltips on Listbox items

Not sure if this can be done, but figured I'd ask...

I have several small listboxes that occasionally have very long items in them Thus, you can't see more than the first portion of each item. What I'd like to do is add some javascript such that, when you hover over a given item in the listbox, it shows a "tooltip" of the entire listitem. Can this be done?
0
toddhd
Asked:
toddhd
  • 2
  • 2
1 Solution
 
devicCommented:
no, this can not be done. Maybe change your design ;)
0
 
devicCommented:
here some idea, maybe it helps you:
-----------------------------------------------
<script>
function runit(obj)
{
      with(obj.style)
      {
            left=obj.offsetLeft;
            top=obj.offsetTop;
            width="500px"
            position="absolute";
            
      }
      obj.size=5;
      obj.onmouseout=function()
      {
            with(this.style)
            {
                  position="";
                  width=100;
            }
            this.size=1;
      }
      obj.onclick=obj.onmouseout;
}
</script>

<select style="width:100px" onmouseover="runit(this)">
      <option>I have several small listboxes that occasionally have very long items in them
      <option>Thus, you can't see more than the first portion of each item.
      <option>What I'd like to do is add some javascript such that,
      <option>when you hover over a given item in the listbox
      <option>it shows a "tooltip" of the entire listitem. Can this be done?
</select>
<input value=kuku><br>
<input value=kuku><input value=kuku><br>
0
 
SnowFlakeCommented:
do you want to have that tooltip before the item is selected ?
or would some form of tooltip after selection will also do ?
0
 
SnowFlakeCommented:
I just wander why would you accept an answer that says "no, this can not be done"
while ignoring my Q ?
0

Featured Post

Free Tool: Site Down Detector

Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

  • 2
  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now