Navigating Views On a button action do the following: 1. Create a Button field. 2. Click the Actions tab. 3. Choose Run a JavaScript from the Select Action drop down menu.
Type one of the following scripts in the JavaScript Editor. To go to the next page: this.pageNum++; To go to the previous page: this.pageNum--; To go to a specific page: this.pageNum = 0; Click OK in the JavaScript Editor. Click Close in the Button Properties dialog box.
Keep in mind that JavaScript is zero based. Therefore if you want to write a script that opens page 7 in a document, your script needs to be written as: this.pageNum = 6;
LiveCycle Solution Moves to the previous page of a form. Use the pageUp method at run time. Examples JavaScript xfa.host.pageUp();
Use the Custom Page Navigation in the Object Library.
My favorite quote - "Success is the ability to go from one failure to another with no loss of enthusiasm.
You can also use xfa.host.currentPage to go to a specific page. [b]xfa.host.currentPage ="1";[/b] will go to page 2 (pages start at zero).
If your form is dynamic and pages are moving around you can put a field on the pages to collect the page number with [b]this.rawValue = xfa.layout.page(this);[/b]
Navigating Views
On a button action do the following:
1. Create a Button field.
2. Click the Actions tab.
3. Choose Run a JavaScript from the Select Action drop down menu.
Type one of the following scripts in the JavaScript Editor.
To go to the next page: this.pageNum++;
To go to the previous page: this.pageNum--;
To go to a specific page: this.pageNum = 0;
Click OK in the JavaScript Editor.
Click Close in the Button Properties dialog box.
Keep in mind that JavaScript is zero based. Therefore if you want to write a script that opens page 7 in a document, your script needs to be written as:
this.pageNum = 6;
LiveCycle Solution
Moves to the previous page of a form. Use the pageUp method at run time.
Examples
JavaScript
xfa.host.pageUp();
Use the Custom Page Navigation in the Object Library.
My favorite quote - "Success is the ability to go from one failure to another with no loss of enthusiasm.