Page 1 of 1
Problem adding Option Via Javascript to Select Menu
Posted: Thu Oct 02, 2014 8:19 pm
by Asif Aly
I am trying to add a country list to a selectmenu
below is the sample javascript
I have tried with different events Click, Selected, Value change, but it does not seem to work...which is the correct event...?
is there something incorrect with the javascript ?
var states = ["Afghanistan", "Albania"];
var dropDown = Appery("nationality");
for(var hi=0; hi);
Problem adding Option Via Javascript to Select Menu
Posted: Thu Oct 02, 2014 8:25 pm
by Evgene Karachevtsev
Hello Asif,
It looks like you code is corrupted by getsatisfaction. Could you please repeat it with tag code?
Problem adding Option Via Javascript to Select Menu
Posted: Thu Oct 02, 2014 9:06 pm
by Asif Aly
Here you go...
Problem adding Option Via Javascript to Select Menu
Posted: Fri Oct 03, 2014 1:51 am
by Yurii Orishchuk
Hi Asif,
replace following code:
pre
dropDown.write(
/pre
With this one:
pre
dropDown.append(
/pre
Regards.
Problem adding Option Via Javascript to Select Menu
Posted: Fri Oct 03, 2014 4:48 am
by Asif Aly
Hi Yurii,
Thanks it does work now. with append.
Wonder what i did wrong when it tried the same option last night,