Page 1 of 2

unwanted option in select once populated

Posted: Tue Oct 08, 2013 10:36 am
by Ram

Dear Appery,

i'm using two select widgets, when choosing an option in the first it changes the other select, this is the code for the first select:

code
var x = Appery("select_language").find("option:selected").val();
var newData = x.split(',');

var dropDown = $('[name=select_voice]');
dropDown.empty();

for(i = 0; i < newData&#46;length; i++) {
dropDown&#46;append('<option value=​"' + newData + '">​' + newData + '<&#47;option>');
}

dropDown&#46;selectmenu('refresh');
/code

my problem is that i'm getting like an empty "header" (un click-able) in the second select as first option:

Image

i tried to delete it by code without any success... can you please help me figure this out?

many thanks in advance!
Best,
R.


unwanted option in select once populated

Posted: Tue Oct 08, 2013 11:32 am
by Maryna Brodina

Hello! Most likely you have an extra comma in first select value. After this line prealert(newData);/pre and see what you get there.


unwanted option in select once populated

Posted: Tue Oct 08, 2013 11:37 am
by Ram

that's not the case:

Image


unwanted option in select once populated

Posted: Tue Oct 08, 2013 1:29 pm
by Maryna Brodina

Could you give us your public app link?


unwanted option in select once populated

Posted: Tue Oct 08, 2013 4:24 pm
by Ram

i'll email it later today, thx much in advance!


unwanted option in select once populated

Posted: Wed Oct 09, 2013 9:27 am
by Ram

i've emailed the link to your support address, thx much!


unwanted option in select once populated

Posted: Wed Oct 09, 2013 9:30 am
by Maryna Brodina

Yes, thank you! We'll take a look and update.


unwanted option in select once populated

Posted: Wed Oct 09, 2013 9:41 am
by Ram

no no no... THANK YOU! :)


unwanted option in select once populated

Posted: Wed Oct 09, 2013 10:13 am
by Maryna Brodina

Not sure I understand :) Do you need our help?


unwanted option in select once populated

Posted: Wed Oct 09, 2013 10:38 am
by Ram

yes i do, just showing my appreciation :)