Skip to main content
Participant
January 23, 2018
Question

Problem with localStorage - Captivate 9

  • January 23, 2018
  • 0 replies
  • 193 views

// Resolved//

Thanks in advance for any thoughts/solutions:

I have two variables in localStorage, "hwmregid" and "hwmexp"; yes - I want them to exist past the single session.

I know the variables are populated correctly into local storage based on the Dev console.

 

I've tried numerous iterations of code to bring the string from localStorage into Captivate with no success.

I set up a Text Caption with the variables displayed to check whether the variable actually makes it into the project.

I have the user variables "hwmRegid" and "hwmExp" created within the Cap9 project.

On my first slide, execute Javascript on Enter.

 

My current strings in the Script Window are:

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

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

 

I'm thinking its something simple I'm missing (captain obvious type miss).

Thanks,  Lee

    This topic has been closed for replies.