Skip to main content
john-player-one
Known Participant
Nov 13, 2017 11:23 PM UTC
Answered

Javascript go to next slide from Web Object

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 is closed to new replies. Start a new post to keep the conversation going.
ankits61431843
ankits61431843Correct answer
Inspiring
Nov 14, 2017 6:18 AM UTC

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

2 replies

ankits61431843
ankits61431843Correct answer
Inspiring
Nov 14, 2017 6:18 AM UTC

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

Translate
john-player-one
Known Participant
Nov 14, 2017 6:40 AM UTC

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"

Translate