Select / Deselect Dropdown Option With JS On IOS 6.x (iPad) November 10, 2022 Post a Comment I'm creating dynamic drodown using html tag with attribute multiple and first option selected by default: Solution 1: When we trigger a <select> in IOS it will use it's own internal browser control, beyond our ability to style. It respects the multiple="true" attribute and acts accordingly. The question is the equiv to asking : "how can I make my browsers toolbar blue when I click on my webpage button" It is not clear from the question why You set mutliple="true" Then set the size=1 Then try to make it behave like a single select with javascript, only allowing one select. I suspect that all you actually need is to remove the multiple = "true" attribute and maybe increase the size ( if you want all options visible ) <select size="3"> <option value="" selected="selected">All</option> <option value="1">One</option> <option value="2">Two</option> </select> Copy Then the native iOS controls can behave as you want. For all other solutions , look into ditching the select ( or hiding it ) and create a custom javascript control made from <ul><li>'s ,or similar, to populate the values behind the scenes. Share Post a Comment for "Select / Deselect Dropdown Option With JS On IOS 6.x (iPad)"
Post a Comment for "Select / Deselect Dropdown Option With JS On IOS 6.x (iPad)"