0

I have been looking around this problem all day but can't find a solution, only people who say it is not possible. Is it really not possible to open a select to show the options programmatically from a JavaScript file?

I have tried to click on it with document.getElementById('mySelect').click(); but nothing happens. I can however use document.getElementById('mySelect').focus(); to focus on the element.

Is there really no way in 2023 to open a select from JavaScript? If so, why?

eligolf
  • 1,682
  • 1
  • 6
  • 22
  • Does this answer your question? [How can you programmatically tell an HTML SELECT to drop down (for example, due to mouseover)?](https://stackoverflow.com/questions/249192/how-can-you-programmatically-tell-an-html-select-to-drop-down-for-example-due) – Taxel Jan 23 '23 at 14:19
  • See https://stackoverflow.com/questions/249192/how-can-you-programmatically-tell-an-html-select-to-drop-down-for-example-due – user39950 Jan 23 '23 at 14:19
  • @Taxel, So only possible in Chrome? Why is this? How hard is it to drop it down? :) – eligolf Jan 23 '23 at 15:20

0 Answers0