Jquery mobile dynamically add option to select

Jquery mobile dynamically add option to select

Author: heomcat Date: 08.06.2017
jquery mobile dynamically add option to select

Source forum post http: I can select options ONE and TWO successfully, however I cannot select the dynamically added options City A or City B. Testing In Chrome, the JS console gives this error when selecting the cities - Uncaught TypeError: Cannot set property 'selected' of undefined.

Safari on iPad gives this error - TypeError: Result of expression 'option' [undefined] is not an object.

I fixed the problem by adding a line to jquery.

Dynamically shortened Text with "Show More" link using jQuery

I dumped the options variable before adding this line and noticed that any options added post create were not there. I'm still getting my head around the JQM core, so I've posted this in hope that someone more knowledgeable will key into what the root cause is.

I can confirm this bug.

And also this fix works, but the code around it is beyond my understanding that the present time. Code Issues Pull requests 11 Projects 0 Wiki Insights Pulse Graphs.

Jquery Mobile - Add Option to Select Dynamically - Stack Overflow

I cannot get added to a Select with javascript to work successfully. This issue was closed.

Create options of a select element dynamically - JQuery Mobile - jQuery Forum

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment.

Populating a select with one option programmatically doesn't allow you to select option · Issue # · jquery/jquery-mobile · GitHub

Terms Privacy Security Status Help. You can't perform that action at this time. You signed in with another tab or window.

Reload to refresh your session. You signed out in another tab or window. ONE TWO And this JS: Static array for testing. Update - I fixed the problem by adding a line to jquery.

Rating 4,5 stars - 692 reviews
inserted by FC2 system