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

Web object Javascript with Captivate 9

Community Beginner ,
Oct 12, 2017 Oct 12, 2017

Copy link to clipboard

Copied

Hi All,

Really stuck here and hoping someone can help or point me in the right direction.

I have created a responsive HTML page which I have added as a web object to my Captivate project.  What I would like to do is call the Captivate JavaScript functions window.cpAPIInterface.....; from my HTML web object to advance the project to the next slide. This may sound unconventional but i am looking to give my project to look and feel of a website so i would have separate HTML web objects on each slide that would be linked through the Javascript calls, allowing the normal tracking of any Captivate project.

Thanks

Views

592

Translate

Translate

Report

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

People's Champ , Oct 12, 2017 Oct 12, 2017

I use:

window.parent.window.cpAPIInterface.next();

Votes

Translate

Translate
Participant ,
Oct 12, 2017 Oct 12, 2017

Copy link to clipboard

Copied

You can advance the slide by using

parent.cp.playMovie()

in your web object html file

Votes

Translate

Translate

Report

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
Participant ,
Oct 12, 2017 Oct 12, 2017

Copy link to clipboard

Copied

If you want to go to next slide. Please use below line in your web object html file

parent.cp.goToNextSlide()

Votes

Translate

Translate

Report

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
Community Beginner ,
Oct 12, 2017 Oct 12, 2017

Copy link to clipboard

Copied

I was hoping this could be added to a html button using the onclick  function like below but nothing happens.

<button type="button" onclick="parent.cp.playMovie()">Continue</button>

Votes

Translate

Translate

Report

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
People's Champ ,
Oct 12, 2017 Oct 12, 2017

Copy link to clipboard

Copied

I use:

window.parent.window.cpAPIInterface.next();

Votes

Translate

Translate

Report

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
New Here ,
Nov 29, 2024 Nov 29, 2024

Copy link to clipboard

Copied

LATEST

hi, you know how its go to a specific frame? i trying  window.cpAPIInterface.setVariableValue("cpCmndGotoFrameAndResume",270); but nothing happend, not works

Votes

Translate

Translate

Report

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
Community Beginner ,
Oct 12, 2017 Oct 12, 2017

Copy link to clipboard

Copied

Thanks Guys, all were correct.

I had been trying to run the course locally and the Javascript wasn't working for some reason.  I  uploaded the course to the LMS  and added all 3 of your responses to an onclick event and Im happy to say it worked.

Thanks for your help.

Votes

Translate

Translate

Report

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