hello all,

i am using script functions for tooltip.

function showTip(js_element)
{ 
var str_selectedElement="";
var str_tipElement=document.getElementById(js_element);
var str_comboElement=document.all('cmd_combo');
    for(var i=0;i<str_comboElement.length;i++)
     {
            if(str_comboElement[i].selected)
	{		str_selectedElement=str_comboElement[i].text;
	break;
	}
     }
str_tipElement.innerHTML=str_selectedElement;
}

This function is giving me tooltip on clicking/selecting items from dropdown list.i want tooltip according to my mouse movement over the list. Not on seleceted item.

<DIV id='tooltip'></DIV>
<Select name="cmd_combo" onmouseover="showTip('tooltip')">

let me know which functions i have to use to get that.

Thanks,
pooja

Recommended Answers

Hope this link might help you. a simple javascript tutorial to create a tooltip like you want it to.

http://javascript.about.com/library/bltip1.htm

Jump to Post

All 3 Replies

Thank you for your reply, I will go through this.

I have gone through the link and have searched more on this topic.
Finally i got to know that options in select tag will not recognise any events.

i cannot use title tooltip because it will last after some time and i cannot modify tittle tooltip to stay longer time.

so finally i am doing this for the solution:
Increase the size of the dropdown to have fullname in dropdownlist.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of 1.20 million developers, IT pros, digital marketers, and technology enthusiasts learning and sharing knowledge.