Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Spawned page from template with icon button

259 views
Skip to first unread message

steve md brown

unread,
Jun 15, 2003, 2:25:37 PM6/15/03
to
I'm creating a multi-page form which includes a large map on each page. I have all the maps saved as individual PDFs and have created a 1 page form with 2 buttons - one large button set to show icon only so that the user can insert the appropriate map. At the top of the page there is an invisible button (over part of the company logo) which is javascripted to spawn a new blank page so additional map pages can be added to the document.

There are 6 other form fields (all text) on the page. I have saved the blank form (no map inserted & all text fields blank) as a template called "blankmap".

The javascript I have used for the spawning is:

this.spawnPageFromTemplate("blankmap");
this.pageNum++;

the javascript I have used in the button field for getting the map is:

event.target.buttonImportIcon();

My problem is that after the first page (which is the only page at this point) is populated (ie PDF map imported via button import) and the text fields are populated - when I click on the invisible field (over the company logo) to spawn a new BLANK page (one with no fields populated - not even the map - the resulting additional page is always a duplicate of the first page. The fields are indeed changeable so I know that they have different names so it is possible just to replace the text & map that has been created. I have also noticed that if a third page is created (from the spawn button on p2) then the page created is a duplicate of the 1st page.

I really need the new ly spawned page to be blank to avoid input errors. Any help would be appreciated.

Thanks

StevieB

steve md brown

unread,
Jun 16, 2003, 3:30:06 AM6/16/03
to
PS I'm using AA5.05 and win2000

dsw

unread,
Jun 16, 2003, 6:40:02 AM6/16/03
to
If you know the name of the generated fields, why not just include an action to reset them after they are generated?

steve md brown

unread,
Jun 16, 2003, 7:50:22 AM6/16/03
to
Thanks for that DSW - are you talking about adding some javascript to the spawnPage action? Or creating a button to reset? The second option is not really viable as there are many, many maps and what I really need is the new page to be added blank - no populated fields and a blank button where the next map should be inserted. If it is the first option would you know what script I have to add? Any help greatly appreciated.
Thanks

Steve

dsw

unread,
Jun 16, 2003, 8:11:48 AM6/16/03
to
I'm talking about reseting the fields to a blank value after the new page is generated.

There may be a better way of doing this, but you might try using resetForm method to reset those fields. Take a look at the Acrobat JavaScript guide for more information about this function.

0 new messages