How to write a javascript for delete page button on spawned page
I've created a form that contains a template page that is spawned using a button. I want the users to be able to delete the spawned pages by either all with a reset form button or by a delete page button on the spawned page they want to delete.
The reset form button works with the javascript:
this.deletePages(2, this.numPages-1);
but
For the delete page button I have this script
this.deletePages(this.pageNum, this.pageNum);
pageNum = pageCount;
It works in removing the page but a window pops up as "Bad Parameter". I think I'm missing something.
Additionally I have a field that populates the total spawned pages with the script
var numpag = this.numPages - 1;
event.value = numpag;
this.calculateNow();
But when the page is delete or the form is reset, it doesn't update. Please help!
