Here is a view of my dynamic form...(click the image to see the whole thing)
and the script attached to the "Get Selected" button.
// form1.purchaseOrder.detailHeader.checkSelectedBtn::click - (JavaScript, client)
var indexStr = getInstanceData(xfa.resolveNodes("detail[*].selected"));
if (indexStr.length != 0) {
for (var i=0;i < indexStr.length; i++) {
xfa.host.messageBox("You selected " + indexStr.substring(i,i+1));
}
}
function getInstanceData(node) {
var str = "";
if (node.length != 0) {
for (nNodeCount=0; nNodeCount < node.length; nNodeCount++) {
// test if the checkbox is selected
if (node.item(nNodeCount).rawValue == "1") {
str += nNodeCount;
}
}
}
return str;
}
I substring and display the index string for demonstration purposes. The form and the sample data are attached. With any luck the virus scanner will not indefinitlely enqueue the assets.
Steve