Double click event not working in Internet Explorer for option list

html, javascript, jquery

Solution

document.getElementById('options').ondblclick = function () {
       var optio = options.options;
var id      = options[options.selectedIndex].id;
   if(id == "optList1")
   {
      alert("abc");
   }
   else 
   {
      alert("xyz")
   }
};


<select name="options" id="options" style="width: 100%;" size="12">
    <option id="optList1" value="1.1">
        2. Enter/Update W/H Data Manually
    </option>
    <option id="optList2" value="1.1">
        1. Enter/Update W/H Data Manually
    </option>

Try this code its working fine on IE

Problem

HTML CODE : ``` <select name="options" id="options" style="width: 100%;" size="12"> <option id="optList1" value="1"> 1. ABC </option> </select> ``` Javascript : ``` document.getElementById('optList1').ondblclick = function () { alert("asf"); }; ``` I am having list in of options in select , in sample there is only one item . Issue is I need to open dialog box on double click of this option... Its working fine in Chrome and Firefox , issue is common , not working in IE.... DEMO Any help super appreciated... Thanks in advance....!!

Original source