Skip to main content
john-player-one
Known Participant
November 13, 2017
Answered

Javascript go to next slide from Web Object

  • November 13, 2017
  • 1 reply
  • 2087 views

Hi Everyone

I have a slide with a Web object displaying a local HTML page (which is published with the project sitting relative to the index.html)

I'd like to put a "Next" link in the actual HTML page (inside the web object) that will then link to the next slide in Captivate.

So in other words, the user needs to scroll to the bottom of the HTML page to click a next button.

Hope this makes sense. I got this far. . .

<p><a href="#" onclick 'window.cpAPIInterface.setVariableValue('cpCmndGotoSlide',NextSlide);'>next</a></p>

Thank in advance

This topic has been closed for replies.
Correct answer ankits61431843

Hi, use parent.cp.goToNextSlide(); on the next button inside web object.

1 reply

ankits61431843
ankits61431843Correct answer
Inspiring
November 14, 2017

Hi, use parent.cp.goToNextSlide(); on the next button inside web object.

john-player-one
Known Participant
November 14, 2017

That was fantastic thank you, worked a treat.

Final bit of code was - <button type="button" onclick="parent.cp.goToNextSlide()">Continue</button>

Will experiment to allow navigation to different slides as well, any pointers would be helpful

eg "Click here to go to slide x"