2 Replies Latest reply: Aug 18, 2010 12:53 AM by Bernd Alheit RSS

    How to restart my Acrobat JavaScript program from the beginning?

    DHeadrick Community Member

      Hi,

       

      Hopefully this is a simple question.  I'd like to provide a button in my JavaScript program called "Restart" that restarts my JavaScript program from the beginning, just as happens when I first open my PDF document.  I don't want to make the user close & re-open the document to restart the JavaScript, I just want to provide the "Restart" button.

       

      If there was a "goto" statement in JavaScript, I would use that ;-)   Although doing a "goto" from within a button-triggered JavaScript back to the beginning of my document JavaScript would probably bypass a return statement or a pop-of-the-stack somewhere.  Alas, there isn't a "goto" statement in JavaScript, so that's a moot point.

       

      In any case, your insights into how I can, from within a button-triggered JavaScript, restart my document JavaScript from the beginning would be appreciated.

       

      Thanks!

       

      Dave