Skip to content Skip to sidebar Skip to footer

Select / Deselect Dropdown Option With Js On Ios 6.x (ipad)

I'm creating dynamic drodown using html

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

  1. You set mutliple="true"
  2. Then set the size=1
  3. 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 )

<selectsize="3"><optionvalue=""selected="selected">All</option><optionvalue="1">One</option><optionvalue="2">Two</option></select>

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.

Post a Comment for "Select / Deselect Dropdown Option With Js On Ios 6.x (ipad)"