Welcome to the in5 Answer Exchange! This a place to get answers about in5 (InDesign to HTML5) and make requests.
0 votes
Is there a way for my in5 html "webapps" that would allow a user to tap on a "back" button that would direct them back to whichever page they came from? This would be just like in Acrobat now, or in a regular browser that would return you to whatever page you were on (and not the previous sequential page from the InDesign document).
Currently, the only options through InDesign are first page, previous page, next page, or last page of document, but no back to the page I was just on.
Any help would be greatly appreciated.
in how_to by (170 points)
retagged by

1 Answer

0 votes
Best answer

Update: The Go to Previous View button action is now supported as of in5 v3.2.3. It can function as a back button.

InDesign doesn't have an option like this built in, but if you name the button in the Button & Forms panel, and apply the following code as a .js file (replacing btn_name with the name of your button) using the Resources section of the in5 dialog, it should work as you hope:

   if(nav.previousPageIndex === undefined) nav.previousPageIndex = 0;
   $('[name="btn_name"]').on(clickEv,function() { nav.to(nav.previousPageIndex+1); });
by (197k points)
edited by
I tried this but it takes me back to the index page each time. Have any advice?
Is this a single-file (index.html) Web App?
It must have been me. I believe we have it working now.
Glad to hear it! :-)