facebook

adding dynamically to select menu list

  1. MobiOne Archive
  2.  > 
  3. Getting Help – General
Viewing 8 posts - 1 through 8 (of 8 total)
  • Author
    Posts
  • #334289 Reply

    upasana
    Member

    I have the select menu with no elements.

        <select id="m1-addmeal-hidden-select-selectList_Food" name="selectList_Food" multiple="true"></select>

    I am trying to use the code as from the help from other topics on the forum.

     $('select[name="selectList_Food"]').append(new Option("option 1", "1"));

    also

    $('select[name="selectList_Food"]').html("<option value='1'>Some oranges</option><option value='2'>More Oranges</option><option value='3'>Even more oranges</option>")

    But a new item under select item as options is not getting added.

    Kindly suggest the correct solution. Thanks

    #334337 Reply

    upasana
    Member

    Hi

    What I am trying to achieve is to dynamically populate the list items of the select menu widget. Could you suggest the best practice to achieve the same.

    Thanks

    #334344 Reply

    Hi upasana,

    As your other question, I’ve asked help to dev team to provide you the best approach to achieve this.

    #334467 Reply

    Hi upasana,

    Vadim (lead dev) has provided us the next example to achieve this task 🙂

    Attachments:
    You must be logged in to view attached files.
    #334516 Reply

    upasana
    Member

    This is exactly what i needed. You made my day! Thanks to you and the dev team 🙂

    #334524 Reply

    Hi upasana,

    Thanks for sharing that this was helpful for you. Closing Thread.

    #336168 Reply

    PaulLeBlanc
    Participant

    Hi Octavio,
    Do you have the <custom.js> file, or the whole www. folder for your <dynSLM.mobi > example?
    Without it the example does not work.
    Paul

    #336169 Reply

    Brandon
    Member

    Paul,

    The code you need is in the button javascript.

Viewing 8 posts - 1 through 8 (of 8 total)
Reply To: adding dynamically to select menu list

You must be logged in to post in the forum log in