2 Replies Latest reply on Feb 6, 2015 9:26 AM by Rstreet-OIdJg4

    Dropdown Help


      Hello -
      First let me start by saying that I am a novice at Java scripting! Lol...I am leaning enough to be dangerous!

      So I am attempting to have a text field (address) populate from a selection on a drop down box (LocationName). Everything works, however, the export values seem to be off.

      When a selection is made from the drop down, the export value that populates in the text field is off by one.

      I have a drop down box (LocationName). I list the drop down Items (Options tab) with an Export Value (the addresses). I also have a text box (Address)
      that I am attempting to have populate with the export value from the dropdown selection.


      I have a document level script that is called from a custom keystroke script.


      Document Level Script:

      function SetFieldValues()
      {this.getField("Address").value = getField("Location").value}

      Custom Keystroke Script:

      As I stated above, this seems to work ok, but the export values are off.



      Selection_A from the dropdown box has an export value of 1234
      Selection_B from the dropdown box has an export value of 2468


      When Selection_A is selected from the dropdown, my text box (address) is populated with Selection_B's export value? Lol...any ideas as to how this might be happening?


      Any assistance will be greatly appreciated


      Thank in advance.

        • 1. Re: Dropdown Help
          try67 MVP & Adobe Community Professional

          Replace getField("Location").value with event.value ...

          • 2. Re: Dropdown Help
            Rstreet-OIdJg4 Level 1

            Thanks try67 for your assistance. I still cant seem to get this to work properly I am sure I am doing this wrong somewhere, but I replaced the getField("Location").value with event.value as suggested but now it produces the same results as Selection_A.


            Meaning, it is not actually populating with the export value, but rather the Item value?


            This is what I did...


            function SetFieldValues()

            {this.getField ("Address").value = event.value}


            Is that what you meant?