unwanted option in select once populated
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.length; i++) {
dropDown.append('<option value="' + newData + '">' + newData + '</option>');
}
dropDown.selectmenu('refresh');
/code
my problem is that i'm getting like an empty "header" (un click-able) in the second select as first option:
i tried to delete it by code without any success... can you please help me figure this out?
many thanks in advance!
Best,
R.