facebook

combobox dropdown not displaying the selected element

💡
Our Forums Have Moved

For help with installation, bugs reports or feature requests, please head over to our new forums.
Genuitec Community on GitHub

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

    lav
    Member

    I have a combobox where there are some 10 elements. this has to be updated from the result of the url.
    The problem is it updates as dropdown but the 1st element which has to displayed is not beeing displayed.

    the code is as follows:

    options += ‘<option value=”‘ + currency[0]+ ‘” selected>’ + currency[0]+ ‘</option>’;
    for(j=1;j<currency.length-1;j++){

    options += ‘<option value=”‘ + currency[j]+ ‘”>’ + currency[j]+ ‘</option>’;
    }
    $(“#m1-liveExchange-hidden-select-currency”).append(options);
    while appending the 1st element has to be displayed on the combobox which is not happening.

    #336772

    Brandon
    Member

    Try setting j to 0, not 1
    for(j=1;
    to
    for(j=0;

    Arrays are 0 based.

Viewing 2 posts - 1 through 2 (of 2 total)
Reply To: combobox dropdown not displaying the selected element

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