javascript - How can you tell if an HTML dropdown is displaying the list of options -
Is there any way to determine whether a given drop down is currently active and displaying a list of options is?
I am currently in the dropdown on the Masuduno event and when the user clicks on it, I am populating the options. Unfortunately, the Masudown incident burns when the user also chooses the option.
If I can determine that the drop down is already displaying its options, then I can populate the option.
This will tell you that the selected element has its options
in javascript
document.getElementById ("mySelectElementId"). Options.length
In JQuery
$ ("# mySelectElementId") [0]. the option . Length
Edit: Try using Focus Events on the Select Selection Element rather than using the Maussaiden Event, it will also ensure that To get the selected entries you have to adjust the controls using the tab by the user.
Comments
Post a Comment