4 Replies Latest reply on Feb 8, 2009 10:52 AM by jason mcconnell

    Combo Box changes items in other combo box not working

    jason mcconnell
      Acrobat 9 Mac

      I have a form created with 2 combo boxes called Product and ProductLine

      When I make a selection in Product I want it to change the available items in the ProductLine combo box.

      Its odd because it seems like it works at times but there must be something wrong with the code or a glitch in acrobat forms because sometimes ill select an item and it doesnt change the next field and other times it will change it right away when I click on the drop down arrow even though I havent made my new selection.

      Here is the code:
      var t = this.getField("Product");
      var l = this.getField("ProductLine");

      var productChoose = new Array("Choose Line...");
      var productMenswear = new Array("Choose Line...", "Mens Prorsum", "Mens Collection", "Mens Lifestyle");
      var productWomensswear = new Array("Choose Line...", "Womens Prorsum", "Womens Collection", "Womens Lifestyle");
      var productNonApparel = new Array("Choose Line...", "Umbrellas", "Wallets", "Something else");
      var productSpecialist = new Array("Choose Line...", "Special Items1", "Special Items2", "Special Items3");

      if (t.value == "Choose Product..." || t.value == ""){
      l.setItems(productChoose);
      }
      if (t.value == "Menswear"){
      l.setItems(productMenswear);
      }
      if (t.value == "Womenswear"){
      l.setItems(productWomenswear);
      }
      if (t.value == "Non Apparel"){
      l.setItems(productNonApparel);
      }
      if (t.value == "Specialist"){
      l.setItems(productSpecialist);
      }

      Any help on this would be much appreciated in fact its possible ill need future help with more advanced javascripting in Acrobat (or even other adobe apps) in which case ill need a paid professional to team up with.

      Thanks very much in advance
      J