facebook

multi select: CLOSED

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

    txarly
    Member

    hi,

    I have a combobox with values from a localstorage.
    They are stored separated by ‘,’…. “proycontac”:”john smith,peter pan, the moon,”
    i build a combobox with names and i want to get selected in the combobox those names that match ‘proycontac’ values.

    -so i build the combobox with:

     $('select[name="combobox1"]').append( new Option(nombre.fname + " " + nombre.lname) ); 

    so the combobox displays john smith,peter pan,etc… correctly

    -now i want to select only the names that match with ‘proycontac’ values.So

     var summary3 = (elnombre.proycontac).split(","); 
    $.map(summary3, function(elem, i) { 
      $('select[name="combobox1"] option[text="' + elem + '"]').attr('selected', true); 
    }); 
       

    But nothing gets selected, any help?

    #331624 Reply

    txarly
    Member

    you can close this finally i got it 🙂

Viewing 2 posts - 1 through 2 (of 2 total)
Reply To: multi select: CLOSED

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