How Can I Show A Tooltip For Each Option On A Dropdown With Javascript Or Ajax?
How can I show a tooltip for each option on a dropdown with JavaScript or Ajax? It is easy to show with the code behind, but this tooltip is not as fast as a tooltip created with J
Solution 1:
You can do something like this with help of javascript by adding this from code behind:
DropDown1.Attributes.Add("onmouseover",
"this.title=this.options[this.selectedIndex].title");
OR
<selectname="DropDownList1"id="DropDownList1"onmouseover="this.title=this.options[this.selectedIndex].title"><optionvalue="1"title="asd">asd</option><optionvalue="2"title="zxc">zxc</option><optionvalue="3"title="qwe">qwe</option></select>
Solution 2:
use this :
<selectname="ddlCity"id="ddlCity"onmouseover="this.title=this.options[this.selectedIndex].title"><optionvalue="Delhi"title="Delhi">Delhi</option><optionvalue="mumbai"title="mumbai">mumbai</option><optionvalue="Chennai"title="Chennai">Chennai</option><optionvalue="kolkata"title="mumbai">mumbai</option></select>
Post a Comment for "How Can I Show A Tooltip For Each Option On A Dropdown With Javascript Or Ajax?"