Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

show value onmouseover

Status
Not open for further replies.

discusmania

IS-IT--Management
Oct 24, 2000
158
AP
hi guys....

Let say i have a list box that the item is so long, so i show only part on the text (i fix the list box width) what i want to do is when i point on that item in the list, a title will show the full text of that item.

how to do that?...

Thanks a lot
 
Very interesting question.
I've spent some time trying to find any tip on how to do it.
It doesn't seem like a possibility to accomplish this task on onmouseover event.
1.If one would want to dynamically manipulate TITLE attribute on some event occurrence, only input elements and anchors support this attribute, and <SELECT> is not it.
2.Second reason is that <OPTION> doesn't support any events at all.

So, if you'll find some info on how to do it, please post it to the Forum.
 
discusmania,
here's a suggestion. Not onmouseover, but onchange.
Take a look.

<!DOCTYPE HTML PUBLIC &quot;-//W3C//DTD HTML 4.0 Transitional//EN&quot;>

<html>
<head>
<title>Untitled</title>
<STYLE TYPE=&quot;text/css&quot;>
<!--
.myStyle {
position: absolute;
visibility: visible;
left: 60px;
background-color : #FFFFB0;
}
//-->
</STYLE>
</head>

<body>
<DIV ID=&quot;myLayer1&quot; CLASS=&quot;myStyle&quot; ></DIV>
<form name=&quot;d&quot;>
<select name=&quot;f&quot; multiple style=&quot;width:40px;&quot; onblur=&quot;myLayer1.innerText=''&quot; onchange=&quot;myLayer1.innerText=d.f.options[d.f.selectedIndex].innerText&quot;>
<option value=&quot;test&quot; title=&quot;test&quot;>Testtttttttttttttttt1
<option value=&quot;test&quot; title=&quot;test&quot;>Testtttttttttttttttt2
<option value=&quot;test&quot; title=&quot;test&quot;>Testtttttttttttttttt3
</select>
</form>

</body>
</html>


Hope this will help.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top