Welcome to the in5 Answer Exchange! This a place to get answers about in5 (InDesign to HTML5) and make requests.
0 votes

Indd file contain two layout sections (ranges). By exporting range="section2", most of buttons(marked red) do not contain target page data-onclick="nav.to(NaN) which of course do not work.

Please take a look export from in5(3.6.9) as it exported fine in previous version in5(3.6.4)

Link to investigate .indd and exported .html:

https://www.dropbox.com/sh/p753b425jgqkiga/AAA-70ESy7e3KEjEavsDSzjIa?dl=0

in bugs by (680 points)
  
If you only export Section 2, and the buttons on those pages link back to Sec 1 pages, they have nowhere to go. I'm not sure what you need to achieve. If you export all sections, all buttons are functional.

Can you clarify the issue for me?
Hey,
With in5_3.6.4, before upgrade to in5_3.6.9, button paroperty [[data-onclick="nav.to(XX)"]] insert exact page number I've inserted into INDD with button properties window.
So if I insert GoToPage[3] in5 exported [[data-onclick="nav.to(3)"]], no matter which section was selected to be exported with in5.
Of course, I need to take into account the exported section page number, because target page will be #3 of "Sec 2".
With further investigation I realised, I need to insert GoToPage[6], that in5_3.6.9 will export button property [[data-onclick="nav.to(3)"]].
This seems somehow logical that in5_3.6.9 recalculate page number, but usually the exported result is [nav.to(NaN)] which is most annoying situations.
Looks like, I will have to manually recheck all exported buttons, SO MY VOTE GOES TO PREVIOUS FUNCTIONALITY, "in5 TO EXPORT EXACT PAGE NUMBER I INSERT INTO indd ButtonWindow>GoTo page>#3.

Why do I export specific section... because my presentation can have 100 pages, so I split it to several "chapters" and create navigation between them. Suppose we all agree, that navigating 100 sequential pages (endless swiping) is not a user friendly option.
See my response below.

Re: "not a user friendly option" - this assumes way too much about the setup of the document. People use alternate layouts in all different ways. "Fixing" this for you would break many other things for other people. in5 can't predict exactly how you will use things like this, because InDesign offers too much flexibility to make assumptions (like all you layouts begin with page 1).

1 Answer

0 votes

If you're getting nav.to(NaN) with Go To Page links, it typically means that the link points to a page outside of the range that is exported. This has been the case for years.

For example, if you export pages 1-10 and page 2 has a TOC linked to page 11 of the document, the link will show NaN in the code (because page 11 wasn't found in the output pages).

In the case of your document, the buttons in sec2 are pointing to pages in sec1, which are not in the export, so this is the expected behavior.

Even though the page names in your sec2 Alternate Layout are "1,2,3,4,5" the Buttons and Form panel uses the page's document offset (1-8 in this case), so page 1 of sec2 is 4. If you link to anything < 4, it will result in NaN when your export range starts with 4.

I'm not aware of any changes to in5 between 3.6.4 and 3.6.9. This has always been the intended behavior.

The only exception is when you export Responsive Layouts, which have matching page counts in each layout. In that case,  a Go To Page 3 action, would go to the 3rd page in the currently visible layout (regardless of its absolute document offset position).

by (197k points)