SET A "GO BACK" BUTTON TO A SPECIFIC PAGE WITHOUT USING THE PREVIOUS PAGE FUNC..

ecuevas1195
Community Member Posts: 5
I was working on a course with a specific UX that the Glossary was in the same window without open an emerge window. So, the glossary included its own sections and the use of the Go To Previous Page function didn't work with the design and the expected functionality. The solution was made with three steps and javascript.
3. In the button Go Back put the next javascript code.
- Set the variable Bookmark in the page where the user clicked the glossary.
- Configure the Go Back button in the Glossary
- Run the GoBack function in javascript.
- In the page where the glossary button is, you have to include a RunJavascript function in the button:
//Defines the variable VarBookmarkBack
var VarBookmarkBack = new Variable( 'VarBookmarkBack', '0', 0, 0, null, null, 'page1.html' );2. In the Glossary you have to create a button to Go Back to the chapter, even if the user navigates through the glossary elements the user can go to the specific page where he or she clicked the glossary.
//Defines the function setBookmark for the page where the user goes to the Glossary.
function setBookmark(){
VarBookmarkBack.set(document.location.href.split("/").slice(-1));
}
//Use of the function
setBookmark();
3. In the button Go Back put the next javascript code.
var VarBookmarkBack = new Variable( 'VarBookmarkBack', '0', 0, 0, null, null, 'page1.html' );
function takeMeBack(){
trivExitPage( VarBookmarkBack.getValue() , true );
}
takeMeBack();
//I defined the variable bookmark again, cause the lectora didn't recognize. So, you can use the page saved and go back to where you were.
Categories
- 35.8K All Categories
- 108 ✫ Announcements
- 33.1K Lectora®
- 31.1K Lectora Discussions
- 28.9K Lectora Desktop
- 2K Lectora Online
- 2K Lectora Feature Requests
- 71 Lectora User Groups
- 36 Lectora Accessibility User Group (LAUG)
- 22 ELB Learning Content
- 22 ELB Learning Content Discussions
- 321 CenarioVR®
- 188 CenarioVR Discussions
- 133 CenarioVR Feature Requests
- 41 Rockstar Learning Platform®
- 38 Rockstar Learning Platform Discussions
- 108 CourseMill®
- 108 CourseMill Discussions
- 47 ReviewLink®
- 47 ReviewLink Discussions
- 5 The Training Arcade®
- 5 The Training Arcade Discussions
- 934 All Things eLearning
- 36 eLearning Development
- 546 Learning Management System (LMS) Integration
- 332 Web Accessibility
- 1.2K ♪ The Green Room
- 9 Additional Learning Products