ListBox Tooltip

G

Guest

Is it possible to add a tool tip to an asp .net listbox control utilizing
javascript or another method? I would like to add a tooltip when the user
hovers over the item in the listbox. I was seeking a code sample.

Thank you,
 
A

adi.jog

Short answer: Yes.

The asp:listbox renders as an HTML SELECT element.
Adding the html attribute "title" to the rendered SELECT will give you
a tooltip

for VB
<listbox>.Attributes.Add("title", "Title goes here")
- and you don't even need javascript!

HOWEVER (and this is probably your problem) IE does not implement title
for the SELECT element.

If you really, really, realy need to fake it, you can use the
mouseover/ mouseout events to show/hide a seperate "tooltip" HTML
element.
Don't forget the IE windowed controls z-index bug!
http://support.microsoft.com/default.aspx?scid=kb;en-us;177378

-- addup --
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,767
Messages
2,569,572
Members
45,045
Latest member
DRCM

Latest Threads

Top