When I add a page, the footer of the last page is automatically deleted. It works perfectly. But I would like that the footer appears again on the last page when I delete the current page.
Here is the code used with the initialize event :
for (var i = 0 ; i < xfa.resolveNode("ira._Page1").count; i++)
if (i < xfa.resolveNode("ira._Page1").count - 1)
xfa.resolveNode("ira.Page1[" + i.toString() + "].Footer").presence = "hidden";
xfa.resolveNode("ira.Page1[" + i.toString() + "].Footer").presence = "visible";
this one used with click event for adding a page :
and at least for deleting a page
Thanks for advance for your help.
You need to remember, each time you remove instances you always have to remove it at last in your code. Because if you delete the subform or page where is the code running well the code doesn't exist anymore.
So you must make sure to do everything else with other objects before removing the instance of its parent.
Thanks Magus, I am going to try to cop with.
This is done by moving the code from initialize event to the "plus" button with the validate event.