Export variable to goodbye.html file
March 15, 2019
Export variable to goodbye.html file
March 15, 2019
Learning Designer
Guide 33 posts
Followers: 21 people

Hi,

I would like to passthrough a variable from Captivate to the goodbye page. Can anyone direct me on how to do this?

Thanks,

Emily

All Comments
Sort by:  Most Recent
2023-04-18 18:35:39
2023-04-18 18:35:39

You can put the data into localStorage and retrieve it in goodbye.html without needing any context.  Put this code in index.html where you have access to all your data:

window.localStorage.setItem(‘STS_Closeout_UserName’,cpQuizInfoStudentName)

 

Then you can read it back in goodbye.html:

User Name: <span id=’user_name’></span>

<script>

document.getElementById(‘user_name’).innerHTML = localStorage.getItem(‘STS_Closeout_UserName’);

</script>

 

Like
()
2019-03-28 09:20:30
2019-03-28 09:20:30

If you upload the course to a LMS, in most cases the user variables cpQuizInfoStudentID and cpQuizInfoStudentName will be populated in each course with the data of the LMS account. Is it one of those that you want to use? Personally I prefer to create a Thank you slide at the end, where you can use the variable. Since it is a good practice to have at least one slide after the score slide (if you have scored objects) such a slide can server for that goal as well.

Like
()
2019-03-27 08:08:39
2019-03-27 08:08:39

Can you give more details please? Which variable? Do you want to display it in the course? Goodbye is not a page.

Like
()
(1)
2019-03-28 04:55:07
2019-03-28 04:55:07
>
Lieve Weymeis
's comment

I have the course exit to the goodbye.html page that is generated in the html5. Specifically I want to have the learner name share out to this file, so that I could make something like a thank you page and personalize it for them.

Like
()