Change selection in Dropdown ("Custom calculation script") based on selection in other Dropdown ("Run custom validation script")

Avatar

Avatar

JJ_Lieb

Avatar

JJ_Lieb

JJ_Lieb

22-05-2019

Good day,

I need to modify an existing JavaScript on a 3D PDF Template and just started to learn the basics on JavaScript... Can you please help me with the following:

I've got two Dropdown boxes, Dropdown box_1 got 5 possible selections, Dropdown box_2 got only 2 possible selections

Dropdown Box 1

The user can choose between the following possible selections "Assembly, Disassembly, Highlight Part, Tools & Jigs, View Kit"

Dropdown Box 2

The user can select either "Assembly" or "Disassembly"

If the user select "Assembly" in Dropdown Box 1, but Disassembly is selected in Dropdown Box 2, Dropdown Box 2 selection must be changed to "Assembly" as well.

The JavaScript code in Dropdown Box 2 looks as follow:

var A3D = get3DAnnot('PdfProID_20190502141849');

var LanguageList = this.getField('PdfProID_20190502141849_Languages');

var StepList = this.getField('PdfProID_20190502141849_StepList');

var OldLanguage;

if(A3D.activated)

{if(!StepList || A3D.context3D.StepListFullyLoaded)

   {if(OldLanguage != LanguageList.value)

     {A3D.context3D.ChangeLanguage();

      OldLanguage = LanguageList.value;

  };

   };

};

Accepted Solutions (0)

Answers (0)