Hi...
I have a hidden drop down field whose values are being filled from a web service response.
I have to fill another drop down based on these values.
Just needed some guidance in the following script...
// DD1-> Drop Down list 1 and DD2 -> Drop downlist 2
var count = DD1.length;
for (var i = 0; i < count; i++)
{
xfa.resolveNode("IN_TAB.DATA[" this.parent.index "]").DD2.addItem(DD1.items[i].value);
}
The part
is not working .. How do I access a drop down value based on index? I have tried different combinations but havent found a proper solution.. Should I be using an array instead? I know I am missing out on something really silly
Any help would be appreciated...
Solved! Go to Solution.
Views
Replies
Total Likes
Hi,
First you should not need to resolve the node as Acrobat/Reader will work with the objects in the same container.
The property you are looking for is "getDisplayItem":
var nItems = DD1.length;
for (var i=0; i<nItems; i++)
{
this.addItem(DD1.getDisplayItem(i));
}
Have a look at this example: http://assure.ly/jcTahK. Look at the middle example.
Hope that helps,
Niall
PS: This script is in the preOpen event of DD2.
Views
Replies
Total Likes
Hi,
First you should not need to resolve the node as Acrobat/Reader will work with the objects in the same container.
The property you are looking for is "getDisplayItem":
var nItems = DD1.length;
for (var i=0; i<nItems; i++)
{
this.addItem(DD1.getDisplayItem(i));
}
Have a look at this example: http://assure.ly/jcTahK. Look at the middle example.
Hope that helps,
Niall
PS: This script is in the preOpen event of DD2.
Views
Replies
Total Likes
Thanks a lot Niall..
As freaky as it may sound, I knew that you would answer this question.. That is why a few minutes ago I had queried this forum with your name followed by 'Drop-Down' and stumbled across this.. http://adobe.hosted.jivesoftware.com/thread/859148 And the next thing was you answering this question, which was really freaky
Thanks again..
Views
Replies
Total Likes
You're welcome - glad I could help
Niall
Views
Replies
Total Likes
Views
Likes
Replies