5 Replies Latest reply on Nov 22, 2010 8:50 PM by newjs

    how to get value from drop down list?

    newjs

      here in this script:

       

      var mydlg = app.dialogs.add({name:"employees"});
      with(mydlg.dialogColumns.add()){
      with(dialogRows.add()){
        staticTexts.add({staticLabel:"employees list"});
      }
      dialogRows.add();
      with(dialogRows.add()){
        staticTexts.add({staticLabel:"select one"});
        var empName = dropdowns.add({stringList:["joe","Sarah","Anne","Andy"], selectedIndex:0});
       
        }
      mydlg.show()
      }

      var Name = empName.selectedIndex;
      alert (Name)

       

       

      when select any element in the list such as the 3th element will get "2",

      but i want to get: "Anne"

       

      can any one help me please, thanks.