4 Replies Latest reply: Jun 23, 2011 12:46 PM by meem23 RSS

    Preserve Script Changes for Drop-down

    meem23 Community Member

      I have a drop down list that changes color depending on selection.  See script below.

       

      form1.Page1.Status.DDlist1::change - (JavaScript, client)

       

      switch(xfa.event.change)

      {

      case "Green":

      this.ui.choiceList.border.fill.color.value = "0,128,0";

      break;

      case "Yellow":

      this.ui.choiceList.border.fill.color.value = "255,255,0";

      break;

      case "Red":

      this.ui.choiceList.border.fill.color.value = "255,0,0";

      break;

      case " ":

      this.ui.choiceList.border.fill.color.value = "255,255,255";

      break;

      }

       

      This works fine if the user does not save the form.  When the form is saved, the color does not hold.

       

      I have Adobe Designer ES, however, I have Acrobat 7.0 so I don’t have the luxury of selecting the Automatic option in the Preserve scripting changes to form when saved - it is not supported. 

       

      Can someone provide a script to hold the color selection.

       

      Thanks!