Your achievements

Level 1

0% to

Level 2

Tip /
Sign in

Sign in to Community

to gain points, level up, and earn exciting badges like the new
Bedrock Mission!

Learn more

View all

Sign in to view all badges

Old chestnut: 3 or more dependent dropdown boxes

Canuig
Level 1
Level 1

This problem has arisen in several threads previously but I have found the solutions difficult to understand. One solution alluded to in the pre-ES 6.X and 7.X discussions seems (to my untrained eye) a potentially very efficient and elegant solution to the problem. It suggested using a script on javascript.com: http://www.javascriptkit.com/script/script2/multiplecombo.shtml. The script seems to be written for a webpage rather than for LiveCycle Designer.

I am using LiveCycle Designer ES3 and what I have done so far is: copied the script portion of what is on javascript.com into a script object and created the dropdown lists required into a form (combo_0, combo_1 etc.) but cannot get the dropdown boxes to respond to the "change" function within the script. Here is the hierarchy:

Hierarchy.JPG

I have tried referencing the "change" function in the script object in various events for each dropdown object (e.g. initialize, change) but to no avail.

Clearly, I'm missing something fundamental and was wondering if there is a simple solution to the problem?

Or perhaps the script isn't appropriate at all, or requires some further functions and coding which would be beyond me.

I would be grateful if anyone could point me in the right direction.

0 Replies
whyisthisme
Level 7
Level 7

try using the exit event eg. in the exit event of combo_2 you might say something like:

if (combo_0.rawValue == 1 and combo_1.rawValue == 1)

{

........

}

Canuig
Level 1
Level 1

Thanks for your reply.

Unfortunately, I couldn't get that to work.

For combo_0 I have also tried referencing the testScript in its pre-open event using:

testScript.change(this)

No joy with that either. The script at http://www.javascriptkit.com/script/script2/multiplecombo.shtml also has a <form> section but I am presuming that is relevant for someone creating a webpage rather than providing code that would be relevant to the operation of the combo boxes.

Magus069
Level 10
Level 10

If you want the post above to be working make sure you have the Specify Item Values checked in the Object ► Binding Palette

Canuig
Level 1
Level 1

Many thanks for your repy Magus069.

Unfortunately I was not able to solve my problem with the javascriptkit approach. I have at last managed to solve my problem by revisiting and persevering with the approach provided in the thread at http://forums.adobe.com/message/5327761. Thanks are due to user Greig at Lands for posting an example in 'workspaces'.