Expand my Community achievements bar.

Dive into Adobe Summit 2024! Explore curated list of AEM sessions & labs, register, connect with experts, ask questions, engage, and share insights. Don't miss the excitement.

Old chestnut: 3 or more dependent dropdown boxes

Avatar

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.

4 Replies

Avatar

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)

{

........

}

Avatar

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.

Avatar

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

Avatar

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'.