Exit
  • Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
  • 한국 커뮤니티
1

Javascript go to next slide from Web Object

Explorer ,
Nov 13, 2017 Nov 13, 2017

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

2.1K
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines

correct answers 1 Correct answer

Participant , Nov 13, 2017 Nov 13, 2017

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

Translate
Participant ,
Nov 13, 2017 Nov 13, 2017

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

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Explorer ,
Nov 13, 2017 Nov 13, 2017
LATEST

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
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Resources
Help resources