2 Replies Latest reply on Jan 15, 2011 5:00 AM by gkaiseril

    Need the face value of a combo box

    gatzkerobgatzke Level 1

      When I click a check box I need to get the "face value" of a combo box. Currently all I can get is the export value.

       

      1-14-2011 8-19-08 PM.png

       

      Thank You!

        • 1. Re: Need the face value of a combo box
          gatzkerobgatzke Level 1

          Problem solved:

           

          // This will alert whatever item is currently selected
          if(myCheckBox.isBoxChecked(0))
          {
              var f = this.getField("myComboBox");
              var a = f.currentValueIndices;
              app.alert(f.getItemAt(a, false));
          }

          • 2. Re: Need the face value of a combo box
            gkaiseril MVP & Adobe Community Professional

            You can check the value of the check box by looking at its value property. The same is true for the combo box unless you have supplied an export value for the displayed option.

             

            Assuming your dropdown is named 'Dropdown1' and the combo box is "Combo Box1", you can use the following scirpt in the "Mouse Up" action of the check box:

             

            if(this.getField(event.target.name).value != "Off") {
            var ddb = this.getField("Dropdown1").value;
            if (ddb == " ") ddb = "\"Blank\"";
            app.alert("\"Dropdown1\" has a value of: " + ddb, 3, 0, "Dropdown1 value");
            }