- Mark as New
- Follow
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report
Hi,
When calling a function that hides/shows subforms, I can only seem to progress up in the heirarchy to parent(s).
Here's how I call the function
SegmentScripts.Indie(this.parent);
The problem is that if I place the "call" on a subform I'm trying to hide, it will hide sibling subforms unecessarily. If I place the call on an object within the subform, it erratically flows up several subform layers instead of its direct parent.
Is there a way to place the call on the subform I want to hide itself, without having the function flow up to its parent?
For reference, here's the function itself (on a script object called SegmentScrips).
function Indie(myParentObject) {
// Declare some variables
var allChildElements;
var intNumElements;
var currentElement;
var i;
// Get all the child nodes of the parent element
allChildElements = myParentObject.nodes;
// Total number of elements in the object
intNumElements = allChildElements.length;
// Loop through all the child elements
for (i=0; i<intNumElements; i++) {
currentElement = allChildElements.item(i);
if(currentElement.className === "subform") {
if (xfa.resolveNode("form1.Page1.Page1.#subform.institutiontype").rawValue ==
{
currentElement.presence = "visible";
}
else {currentElement.presence = "hidden";
}
}
}
} // End of the function
Views
Replies
Total Likes