0

Hello all,

I am using IE.
I have dropdown list with <select><option></option></select> on which i cannot provide custom tooltip on hover, because <option> will not support onmouseover event.

so i am now supposed to create one custom dropdownlist not using <select><option></option></select>.
may be using combination of <table> and <textbox> on which i can write functions to show tooltip.

please let me know how can i do this?

3
Contributors
6
Replies
7
Views
7 Years
Discussion Span
Last Post by KPooja
0

KPooja, I'm not sure how much you hope to get out of your tooltips, but have you considered using the 'title' attribute in your option tags. This works on both IE and Firefox, although I didn't have as much luck with Chrome, Safari, or Opera.

0

KPooja, I'm not sure how much you hope to get out of your tooltips, but have you considered using the 'title' attribute in your option tags. This works on both IE and Firefox, although I didn't have as much luck with Chrome, Safari, or Opera.

Thank you for your reply.
here, 'title' attribute i cannot use because as i know we cannot increase the time to show tooltip using title attribute. 'tittle' attribute when i use it will stay for short period of time and will dissappear after some time.so my problem is here, i am not able to increase the timestamp thats why i am switching custom dropdown list.
If you have any idea how to increase the timestamp in 'title' attribute then i can use that.

Thank you.

0

I dont believe a dropdown list can add an onmouseover attribute.

What you could do is create a div, then for each item create a span (this would be your 'options').
For each span give it an onmouseover attribute which would call a script to display a div.

Basically youre creating your own dropdownlist.... AND the added benefit is.... you can give it your own style instead of being stuck with tge generic dropdown lists :)

0

I dont believe a dropdown list can add an onmouseover attribute.

What you could do is create a div, then for each item create a span (this would be your 'options').
For each span give it an onmouseover attribute which would call a script to display a div.

Basically youre creating your own dropdownlist.... AND the added benefit is.... you can give it your own style instead of being stuck with tge generic dropdown lists :)

Hi,

I have tried with the solution you provided with div tag and span tag. My code looks like this for span tag:
<div id=mydiv></div>
<select>
<option value="<%=div%>"><span onmouseover="toolTip(mydiv)"><%=ls_Name%></span></option>
</select>
But it is not working.

let me know what modifications i need to do to consider onmouseover event for this dropdown.
Thank you.

0

No you cant do that...
Forget about using a select entirely.
What Im saying is somthing like this.......

<div id="divMyCustomSelect" style="blah blah" onClick="showFunction();">
<span id="span1" style="blah blah" onMouseover="someFuction();"
<span id="span2" style="blah blah" onMouseover="someFuction();" onClick="someOtherFunction();">onClick="someOtherFunction();">
</div>

In this scenario when you click on the div (the fake dropdown), you would create a javascript that would then show all the spans. As you mouse over the spans the mouseover event would trigger. You can then add an onlick event if you want to select that value (span.innerHTML). Making sense?

0

No you cant do that...
Forget about using a select entirely.
What Im saying is somthing like this.......

<div id="divMyCustomSelect" style="blah blah" onClick="showFunction();">
<span id="span1" style="blah blah" onMouseover="someFuction();"
<span id="span2" style="blah blah" onMouseover="someFuction();" onClick="someOtherFunction();">onClick="someOtherFunction();">
</div>

In this scenario when you click on the div (the fake dropdown), you would create a javascript that would then show all the spans. As you mouse over the spans the mouseover event would trigger. You can then add an onlick event if you want to select that value (span.innerHTML). Making sense?

Yes. thank you for the solution. I am able to do this way.

This question has already been answered. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.