Asif Aly
Posts: 0
Joined: Wed Oct 01, 2014 8:08 pm

Problem adding Option Via Javascript to Select Menu

I am trying to add a country list to a selectmenu

below is the sample javascript

  1. I have tried with different events Click, Selected, Value change, but it does not seem to work...which is the correct event...?

  2. is there something incorrect with the javascript ?

    var states = ["Afghanistan", "Albania"];
    var dropDown = Appery("nationality");
    for(var hi=0; hi);

Evgene Karachevtsev
Posts: 12
Joined: Mon Apr 28, 2014 1:12 pm

Problem adding Option Via Javascript to Select Menu

Hello Asif,

It looks like you code is corrupted by getsatisfaction. Could you please repeat it with tag code?

Asif Aly
Posts: 0
Joined: Wed Oct 01, 2014 8:08 pm

Problem adding Option Via Javascript to Select Menu

Here you go...

Image

Yurii Orishchuk
Posts: 0
Joined: Fri Feb 14, 2014 8:20 am

Problem adding Option Via Javascript to Select Menu

Hi Asif,

replace following code:

pre

dropDown.write(

/pre

With this one:

pre

dropDown.append(

/pre

Regards.

Asif Aly
Posts: 0
Joined: Wed Oct 01, 2014 8:08 pm

Problem adding Option Via Javascript to Select Menu

Hi Yurii,

Thanks it does work now. with append.
Wonder what i did wrong when it tried the same option last night,

Return to “Issues”