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

Use Captivate Variables in dynamic URL

New Here ,
Oct 17, 2016 Oct 17, 2016

Hello,

I am attempting to user Captivate vaiables to build a dynamic URL, however, I am having no luck locating them in the DOM.  I have tried just alerting variables specified in this link List of variables in Adobe Captivate. 

I have tried top, parent, and cp to locate the variables and am getting undefined for all.

When calling these variables in JavaScript, how do they have to be accessed?

Thanks,
Matt

TOPICS
Advanced
471
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
People's Champ ,
Oct 17, 2016 Oct 17, 2016

What code are you using to alert these variables?

Where are you executing the code?

What version of Captivate and which output, SWF or HTML5 or both?

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
New Here ,
Oct 17, 2016 Oct 17, 2016

Currently just using a button to alert them with the action set to execute javascript.

so, for instance alert(cpQuizInfoStudentID);

Using Captivate 9.  Tried both outputs.

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
People's Champ ,
Oct 17, 2016 Oct 17, 2016
LATEST

If you are just using HTML5 you can get them in the window object:

window.cpQuizInfoStudentID

If you are using both SWF and HTML5 or just SWF you'll need to use the Common JS Interface:

window.cpAPIInterface.getVariableValue('cpQuizInfoStudentID')

You can read about the interface here.

Learn about the Common JavaScript interface for Adobe Captivate

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