• Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers

"Masterlist" in javascript

New Here ,
May 06, 2020 May 06, 2020

Copy link to clipboard

Copied

I just got my fingers on javascript and my first step was to create my own form by adapting the example file in this tutorial:
https://acrobatusers.com/tutorials/js_list_combo_livecycle/index.html#
In the example the masterlist contains three information: assembly, parts and price.
The partslist in the second dropdown depends on the assembly selection in a first dropdown. The Price shown depends on the selection in the second dropdown.
What I'm struggling with is that I need a fourth information, lets call it "color", in the masterlist.
How do I have to extend the masterlist or is the idea tottaly wrong? Just adding the additional infromation in brackets obviously doesn't work at all.

example from the tutorial:
var oAssemblyParts = { Chasis: [ ["-","None"],["Rear Bracket",205.95],

A hint in which direction to work would be great. Thank you all.

 

TOPICS
Acrobat SDK and JavaScript

Views

179

Likes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
May 06, 2020 May 06, 2020

Copy link to clipboard

Copied

What should happen at selecting "color" in the masterlist?

Likes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
May 07, 2020 May 07, 2020

Copy link to clipboard

Copied

The "color" value needs to be inserted in several different places in the form. So it has to seperated from the price value in some way.

Likes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
May 06, 2020 May 06, 2020

Copy link to clipboard

Copied

Why not? That's exactly what you should do.

So this:

Chasis: [
		["-","None"],
		["Rear Bracket",205.95],
		["Front Bracket",185.95],
		["Long Support",44.95],
		["Front Bearing",48.95]

 

can become something like this:

 

Chasis: [
		["-","None", "None"],
		["Rear Bracket",205.95, "Red"],
		["Front Bracket",185.95, "Green"],
		["Long Support",44.95, "Blue"],
		["Front Bearing",48.95, "Black"]

Likes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
May 07, 2020 May 07, 2020

Copy link to clipboard

Copied

LATEST

That was my first attempt but made a mistake because in some place the value for "price" ist text. My seperation was incorrect. I used quotationmarks for each value. It works if you put is as a package in quotes, seperated by a comma.
The solution came from the tutorials author in a similar question that I found by accident.
https://answers.acrobatusers.com/using-event-changeEx-q40824.aspx

Thank you for your help.
Problem solved

Likes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines