0 Replies Latest reply on Aug 2, 2012 1:37 PM by Jstout101

    selected item in DropDown1 makes an Item in  DropDown2  "faded out" or "watermarked".

    Jstout101 Level 1

      once an item has been selected in DD1 I want to make an Item in  DD2  "faded out" or "watermarked".  See my previous post for more infomation about my form http://forums.adobe.com/thread/1042792

       

      I have DD1 Set so that when one item is selected some items from DD2 are visible but not selectable.  My question is I want to make the non selectable items font change to:

      {

        this.fontColor = "153,153,153";

        this.font.posture = "italic";

      }

       

       

      my code follows:

       

      Formular1.#subform[0].DDL2::change - (JavaScript, client)

       

       

      var notUsed = new RegExp(NotUsed.value.text.value);

       

       

      if (this.boundItem(xfa.event.change).match(notUsed)) {

                xfa.event.change = "";

      }

       

       

      Formular1.#subform[0].DDL1::change - (JavaScript, client)

       

       

      var list1 = ["UU", "VV", "WW", "XX", "YY", "ZZ"];

      var list2 = ["UU", "VV", "WW", "XX", "YY", "ZZ"];

       

       

      if (this.boundItem(xfa.event.change) == "1") {

                DDL2.clearItems();

                for (var i = 0; i < list1.length; i += 1) {

                          DDL2.addItem(list1[i], (i + 1).toString());

                }

                NotUsed.rawValue = "2";

      } else {

                DDL2.clearItems();

                for (i = 0; i < list2.length; i += 1) {

                          DDL2.addItem(list2[i], (i + 1).toString());

                }

                NotUsed.rawValue = "2|4|6";

      }