Skip to main content
Participant
November 20, 2013
Question

Is it possible to link a specific slide in a project from another project?

  • November 20, 2013
  • 1 reply
  • 1543 views

Is it possible to link a specific slide in a project from another project? Rather than the begining of the project, which I know is possible.

This topic has been closed for replies.

1 reply

Legend
November 21, 2013

Hi Sarah,

Yes, this is possible with a bit of JavaScript.  Do an Execute JavaScript action on entry of slide 1 with the below code:

window.getQueryParamValue = function (name){

          var q=document.location.search||document.location.hash;

          if(name==null){return q;}

          if(q){var aryParams=q.substring(1).split("&");

                    for(var i=0;i<aryParams.length;i++){

                              if(aryParams.substring(0,aryParams.indexOf("="))==name){

                                        return aryParams.substring((aryParams.indexOf("=")+1));

                              }

                    }

          }

          return "";

}

if(typeof window.cp === 'undefined'){

          var gotoSlideNumber = getQueryParamValue('cpCmndGotoSlideAndResume');

          if(gotoSlideNumber != '') {

                    document.Captivate.cpEISetValue('m_VarHandle.cpCmndGotoSlideAndResume', gotoSlideNumber -1);

          }

}else{

          window.gotoSlideNumber = window.getQueryParamValue('cpCmndGotoSlideAndResume');

          if(window.gotoSlideNumber != '') {

                    window.cpCmndGotoSlideAndResume = window.gotoSlideNumber -1;

          }

}

Then you can access your course using URL parameters like so:

For SWF output:

http://captivatedev.com/demo/Cp7/JumpToSlide/slide.htm?cpCmndGotoSlideAndResume=9

For HTML5 output:

http://captivatedev.com/demo/Cp7/JumpToSlide/index.html?cpCmndGotoSlideAndResume=7

For Multiscreen:

http://captivatedev.com/demo/Cp7/JumpToSlide/multiscreen.html?cpCmndGotoSlideAndResume=5

The cpCmndGotoSlideAndResume = ? will make the course jump to that slide regardless of SWF or HTML5 output.

Legend
November 21, 2013
Legend
November 21, 2013

You can read more about this with specific use cases here:

http://captivatedev.com/2013/11/21/jump-specific-slide-course-using-captivate-7/