The program goes to the appropriate sections, but the presence event does not work? Where am I going wrong? I also have tried to set the property to invisible in the workspace and then just turn it on through scripting. That approach is not working either.
form1::initialize - (JavaScript, client)
//xfa.host.messageBox is used to determine if this section is being processed.
xfa.host.messageBox("We are initializing");
//The intent is to make these parts of the form invisible. The first is a subform, the second a text field.
form1.sfPage1.sfPresidency.presence = "invisible";
form1.sfPage1.sfProposedCalling.TextField1.presence = "hidden";
//In neither case does the presence of the object go invisible or hidden.
form1.sfPage1.sfProposedCalling.Organization::change - (JavaScript, client)
switch(xfa.event.newText){
case "EQ":
// A message is to appear to show that the program has reached this section.
// It does reach this section.
xfa.host.messageBox("This is the EQ subForm");
form1.sfPage1.sfPresidency.presence = "visible";
form1.sfPage1.sfProposedCalling.TextField1.presence = "visible";
// The appropriate messages show up, but neither of the presence events work.
break;
default:
xfa.host.messageBox("Default");
break;
}