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

Using Javascript to go to next page

Community Beginner ,
Apr 24, 2009 Apr 24, 2009

I'm trying to figure out how to advance to the next page in a captivate 3 course using Javascript. We have navigation buttons for "Prev" and "Next", but I'd like to be able to call some JavaScript when they click the Next button on a particular page, and then at the same time, advance to the next page.

This is being launched from an LMS. The initial JS is going to set the score to 100%, which works fine. We typically have a "Close Course" button on the last slide to make sure it passes back a 100%, but many students are not clicking that button and the course simply returns a "passed" with a 0%.

So making this JS call as part of the "Next" button should result in more 100% scores when they get to the end of the course, but I need it also to advance to the next slide.

Thanks for any assistance!

John

TOPICS
Advanced
5.8K
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
Valorous Hero ,
Apr 24, 2009 Apr 24, 2009

Hi there

Methinks you are overthinking this. Here's why.

Note that any Button or Click Box obeject will release the pause when it has been clicked by the user unless you specifically configure it not to. If you assign some JavaScript to the Button object and the user clicks it, it does two things.

  • Carries out the assigned action
  • Releases the pause so the movie continues playing

So I'm thinking in this case it's a simple matter of timing.

Cheers... Rick

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
Community Beginner ,
Apr 24, 2009 Apr 24, 2009

Thanks for the reply.

I'm placing the JS code in the Button properties window in the on_success field. I have this set to "execute javascript". Initially it was set to "Go to Next Slide". When testing this out, it executes the JS, but I have to click on the button 3 times or so in order to advance to the next slide. The JS code runs immediately, so there's no delay in that. My goal is to have this auto advance to the next slide once the JS executes.

Thanks!

john

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
Guest
Sep 26, 2013 Sep 26, 2013

I'm curious if anyone has ever solved this.. I'm trying to do the exact same thing as John (jdalypa2)  requested using Captivate v7.0.

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
Advisor ,
Sep 26, 2013 Sep 26, 2013
LATEST

This thread is over four years old.  I would suggest creating a new post stating your reasons for wanting to do this.  I would think an advanced action would be sufficient vs. doing JavaScript, but it all depends on your requirements.  Please start a new thread.

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