4 Replies Latest reply on May 29, 2016 1:51 PM by lf.corullon

    Populate textedit field with selection from dropdown

    lf.corullon Level 3

      Hello, everyone!

      Thank for a lot of help you give me since a long time.

      I ever search and find great solutions.

      But, this time, I didn't find nothing.


      I need to populate a textedit field based on a selection in a dropdown list.

      Is there a way to do this?


      My fragment:

      var myP0a = myGtop.add("panel", undefined, "JOURNAL");
      myP0a.margins = [10,15,10,10];
      var myTEMPLATE = myP0a.add("dropdownlist", ["","",200,25], ["", "Journal 01", "Journal 02", "Journal 03", "Journal 04", "Journal 05", "Journal 06"]);
      myTEMPLATE.selection = 0;
      var myGdoi = myG1.add("group");
      myGdoi.add("statictext", undefined, "DOI:");
      myGdoi.orientation = "row";
      var myDOI = myGdoi.add("edittext", undefined, "000");
      myDOI.characters = 34;


      Based on the myTEMPLATE's selection, I want to populate the myDOI field.

      Is it possible?


      Thanks in advance and sorry if this question is already asked in another topic.