I would do this pretty much the same way, only instead of looking for
the country code (AU, US, SA), Look for the state. So your XML would
start to get a bit big as you would have to have a separate node for
every state with it's capital. For example, if you chose US in the
first drop down, and California in the second drop down, the capital
of California I believe is Sacremento so your XML file would have a
new node like:
<California>
<item>Sacremento</item>
</California>
And you would have some script for the 3rd drop-down list like:
var tempString = "xfa.record." + this.boundItem(xfa.event.newText);
var oItems = xfa.resolveNode(tempString);
var nItemsLength = oItems.nodes.length;
myinfo.page1.capital.clearItems();
myinfo.page1.capital.rawValue = null;
for (var nItemCount = 0; nItemCount < nItemsLength; nItemCount++)
{
myinfo.page1.capital.addItem(oItems.nodes.item(nItemCount).value);
}
But I am a little confused as there will only ever be a single capital
for each state, and you can only select one country and one state, so
why would you need a 3rd drop-down list for a single item representing
the capital. I am sure that I am not understanding something here so
perhaps you can clarify.
Dave