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 Westi on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Is there a way to use a TITLE attribute for HTML SELECT

Status
Not open for further replies.

ClarkJeff

Programmer
Feb 28, 2002
46
US
Is there a way to have a Tool-Tips type popup TITLE when you hover over a SELECT drop-down box? I suppose I could write some Javascript for the mouseover event. Any clues? Thanks.
 
Hi There ...
you can write a javascript for mouseover and by in that
javascript you display a div.
and by mouseout you hide that div ...
here is th code ...

function displaytext(urltxt) {
if (urltxt=='*')
BarToolTip.style.visibility='hidden';
else
{
BarToolTip.innerHTML=urltxt;
BarToolTip.style.left=event.x-10+document.body.scrollLeft;
BarToolTip.style.top=event.clientY+10+document.body.scrollTop;
BarToolTip.style.visibility='';
}
}

And right after your body tag you can declare a div like
this :

<div nowrap dir=&quot;rtl&quot; id=&quot;BarToolTip&quot; align=&quot;left&quot; style=&quot;
width:1;
background-color:#6878B8;
position:absolute;
border:solid #0000A0 1px;
font-size:10;
font-family:Tahoma;
color:white;
visibility:hidden;
top:0;left:0;
&quot;></div>

and then you can use mouseover and mouseout calling
Displaytext function and passing the text you want to
be displayed and for hiding the div call the function
by mouseout event with * parameter.

hope to be useful.
E.T.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top