Explore the community Forums Lectora Tips and tricks Navigation with java Script and variables Reply To: Navigation with java Script and variables

#401437 Score: 0
Profile photo of Math Notermans
Math Notermans
Member
contributor
intermediate
advanced
friend finder
junior moderator
advocate
LUC16 Attendee
LUC16
wise owl
curious george
129 pts
@mnotermans5114

Yes that works way better. No worry about Chapters and Sections. You just have to ensure a variable for LastPageId is updated on every page… and publish with this option checked: Convert Page Names to short ID-based Names
And then with this function you can go back to your last stored page..

function getBackPageId(){
lastPageId = VarLastPageId.getValue();
var test = “page”+lastPageId+”.html”;
console.log(“page: “+test);
trivExitPage(test,true);
}

Make sure your summary pages dont inherit any code storing the IDs and all will work fine.

Kind regards,

Math