I have an empty select element, I want to execute some code when that element is clicked on, but I do not want the dropdown list to appear, here is what I have found:
- When I disabled the select element I cannot catch the mousedown event.
- When I enable the select element I can capture the mousedown event but the dropdown list appears.
For arguements sake what I want is to be able to click the select element, JavaScript to throw an alert box but I want to prevent the dropdown list from displaying.
Thanks!