'check all checkbox' not working on spawned pages
I have created a form with page templates that spawn when a checkbox is checked on p1.
One of the page templates has a list of checkbox options, with a 'select all' checkbox, which checks all checkboxes in the list.
When the page is spawned, it loses the functionality of 'select all'.
How can I ensure that the 'select all' checkbox links to the other checkboxes on it's spawned page?
So far I have:
if(event.target.isBoxChecked(0))
{// Perform actions when checked
this.getField("option1").checkThisBox(0,true);
this.getField("option2").checkThisBox(0,true);
this.getField("option3").checkThisBox(0,true);
else
{// Perform actions when unchecked
this.getField("option1").checkThisBox(0,false);
this.getField("option2").checkThisBox(0,false);
this.getField("option3").checkThisBox(0,false);
}
This works on the Page Template, but loses it's functionality on spawned pages.
I'd love some help - I think I need to include a reference within the script that includes the current page number and template name, before each 'this.getField("option3").checkThisBox(0,false);'
Thanks.