11 Replies Latest reply on Sep 9, 2009 5:44 PM by gkaiseril

    go to page

      I am trying to create naviagation buttons in an adone acrobat documnet. I know NO javascript

      How would I write the statement

      go to page 3

      In javascript
        • 1. Re: go to page
          try67 MVP & Adobe Community Professional
          this.pageNum = 2;
          • 2. Re: go to page
            gkaiseril MVP & Adobe Community Professional
            Page numbering in Acrobat for JavaScript starts at 0 and not 1, so the page number one uses is 1 less than the viewed page in JavaScirpt.

            If you want to create a next button one can increment the current page number:

            this.pageNum++;

            For a previous button, decrement the current page number:

            this.pageNum--;

            To go to the last page, use the number of pages less 1

            this.pageNum = this.numPages - 1;

            And the first page of the doucment is 0:

            this.pageNum = 0;
            • 3. Re: go to page
              rll111

              This code doesn't work for me. Is it because I have renamed the pages, such as "DanceSubformPage 3." Or because they're hidden?

              • 4. Re: go to page
                try67 MVP & Adobe Community Professional

                Are you referring to the "Back to main page" button? It works just fine.

                • 5. Re: go to page
                  rll111 Level 1

                  Thanks for responding. No, I'm trying to apply the "go to page x" to the check boxes for various selections, such as choosing a vocal performance, that would take the users to that subform. Or to a page of labels to complete if the user would be entering artwork, or to a page of guidelines. The page navigation buttons included with the program only work for sending the user to the first, next or last page.

                  Randee Leightcap

                  Graphic Artist

                  rleightcap@aclsys.org

                   

                  Atlantic County Office of Cultural & Heritage Affairs

                  40 Farragut Avenue, Mays Landing, NJ 08330

                  (609)625-2776, extension 6339, FAX (609)625-5908

                  www.aclink.org/culturalaffairs

                   

                  Atlantic County Library System, Community Relations Section

                  306 E. Jimmie Leeds Road, Galloway, NJ 08205, (609)652-1956, FAX (609)652-1863

                  www.atlanticlibrary.org

                  • 6. Re: go to page
                    Patrick Leckey Level 3

                    Are you saving your output as Dynamic XFA or Static XFA?

                    • 7. Re: go to page
                      rll111 Level 1

                      Dynamic - I'm working in LiveCycle 8 if that matters.

                      Randee Leightcap

                      Graphic Artist

                      rleightcap@aclsys.org

                       

                      Atlantic County Office of Cultural & Heritage Affairs

                      40 Farragut Avenue, Mays Landing, NJ 08330

                      (609)625-2776, extension 6339, FAX (609)625-5908

                      www.aclink.org/culturalaffairs

                       

                      Atlantic County Library System, Community Relations Section

                      306 E. Jimmie Leeds Road, Galloway, NJ 08205, (609)652-1956, FAX (609)652-1863

                      www.atlanticlibrary.org

                      • 8. Re: go to page
                        Patrick Leckey Level 3

                        This code will not work on a Dynamic XFA form since it has no defined concept of "pages".  That's the whole point of a Dynamic XFA form - the content can grow, shrink, whatever is required based on the content.  So this type of code will not work with Dynamic XFA.

                         

                        If you and not using any of the dyanmic properties of Dynamic XFA in your form, then save it as Static XFA and the code will work.

                        • 9. Re: go to page
                          rll111 Level 1

                          I guess I'm using other dynamic properties on this form, because subforms do not appear when clicked in the version I tried saving as a static form. Isn't there another way to specify what to go to?

                          Randee Leightcap

                          Graphic Artist

                          rleightcap@aclsys.org

                           

                          Atlantic County Office of Cultural & Heritage Affairs

                          40 Farragut Avenue, Mays Landing, NJ 08330

                          (609)625-2776, extension 6339, FAX (609)625-5908

                          www.aclink.org/culturalaffairs

                           

                          Atlantic County Library System, Community Relations Section

                          306 E. Jimmie Leeds Road, Galloway, NJ 08205, (609)652-1956, FAX (609)652-1863

                          www.atlanticlibrary.org

                          • 10. Re: go to page
                            Patrick Leckey Level 3

                            If you're sure that content is going to be on a specific page regardless of the form reflow before that, you can do event.target.pageNum = X;  Just keep in mind that based on the amount of data and reflow required in a dynamic form, that content may change pages.

                            • 11. Re: go to page
                              gkaiseril MVP & Adobe Community Professional

                              This is an Acrobat From Scripting fourm. You are using LiveCycle Desigenr and that is very different than Acrobat Forms and there are forums specifically for that product.