Hi
I am not familiar with Java Script so if anyone can advise me on this I would be grateful. I am using ADobe Livecycle V8.0.
I have two drop down lists - DDL1 and DDL2.
The choices in DDL1 are "High, Medium, Low, None"
The choices in DDL2 are "Positive, Negative, None"
If "None" is selected in DDL1 I want DDL2 to display "None".
If any of the other values are selected in DDL1, then I don't want anything autofilled in DDL2.
Hope this makes sense!
Thank you.
Views
Replies
Total Likes
This should do the trick:
in the "change" event of DropDownList1, put this:
if (xfa.event.newText == "None"){
DropDownList2.selectedIndex = 3; // at pos. 3, you should have "None"
// otherwise change here at your convenience
}
else {
DropDownList2.selectedIndex = 0; // here first element empty/default
// maybe you prefer the last one
}
Note that generally dropdown boxes have the first or last element empty/default; this way, when you script the "else" part, you can easily reset DropDownList2.
Views
Replies
Total Likes
Hi mrfale67,
Just wanted to say thank for your help. After I spent a while figuring out the logic of your code it worked perfectly - so thank you for that, I appreciate it.
JDW
Views
Replies
Total Likes