Skip to main content
Inspiring
December 17, 2014
Question

Transfer user input data from one captivate file to another

  • December 17, 2014
  • 1 reply
  • 3853 views

Greetings.

Using one Captivate 8  file to password protect access to another Captivate 8 file.

The user logs in with their user name, which is assigned to a variable $$username$$.

Can I somehow transfer this user name to another Captivate file which is opened by the first file?

Hope the question is clear.

Thanks so much.

Daniel.

This topic has been closed for replies.

1 reply

Legend
December 17, 2014

You can do this using URL parameters or LocalStorage. 

Using the browser's localStorage JavaScript object:

You can set/store an item to storage like this:

window.localStorage.setItem('StudentName', window.cpAPIInterface.getVariableValue("StudentName"));

In the other course, you can retrieve the value like this:

window.cpAPIInterface.setVariableValue("StudentName", window.localStorage.getItem('StudentName'));

This assumes you have a Captivate user variable called "StudentName" in both Captivate projects.

Jim Leichliter

Legend
December 17, 2014

I left out that the first bit of code would probably be executed on a text entry box's submit button.... or any button.

The second bit of code could go on slide entry of the first slide of the other captivate project.