Skip to main content
Participant
November 28, 2017
Answered

Captivate Javascript jump to slide

  • November 28, 2017
  • 1 reply
  • 5552 views

Hi Guys,

I have html web objects within each page of my Captivate Project and use

<button onclick="window.parent.window.cpAPIInterface.next();">Next</button> to move to the next slide, I would also like to have the option to jump to a slide (name or number).  Any help would be greatly appreciated

Thanks

This topic has been closed for replies.
Correct answer TLCMediaDesign

The JavaScript for the jump is:

cpCmndGotoSlideByUIDAndResume = 4839;',

You can get the id's to jump to like so:

var getSlides = cp.model.data.project_main.slides.split(",");

window.cpCmndGotoSlideByUIDAndResume = getSlides[2].substring(5, getSlides[2].length);

the "2" in bold (getSlides[2].) is the slide to jump to, it is zero based, so the code above jumps to slide 3.

1 reply

TLCMediaDesign
TLCMediaDesignCorrect answer
Inspiring
November 28, 2017

The JavaScript for the jump is:

cpCmndGotoSlideByUIDAndResume = 4839;',

You can get the id's to jump to like so:

var getSlides = cp.model.data.project_main.slides.split(",");

window.cpCmndGotoSlideByUIDAndResume = getSlides[2].substring(5, getSlides[2].length);

the "2" in bold (getSlides[2].) is the slide to jump to, it is zero based, so the code above jumps to slide 3.

Participant
January 10, 2018

Thanks for you help