Forum Discussion
Example files: Generating a certificate from Storyline
Hi All
The code works like a charm, however I am trying to add the current date to the certificate.
I have tried creating a date variable in Storyline and then calling that variable to the certificate, and I have tried calling the date using script in the Certificate HTML, but both times I end up with just a blank certificate, picture no text
Could some one suggest how and where I add the new script to the Certificate.HTML please?
I have a variable called %SystemDate% in Storyline which works using this script;
var currentTime = new Date()
var month = currentTime.getMonth() + 1
var day = currentTime.getDate()
var year = currentTime.getFullYear()
var dateString=month + "/" + day + "/" + year
var player = GetPlayer();
player.SetVar("SystemDate",dateString);
And I have tried this code in the Certificate.html
var learnerScore=player.GetVar("Score").toString();
document.write("
");.
I have a feeling it is how I am trying to add the additional code to the original script that is causing the problem.
Any suggestions would be gratefully received
Thanks in advance
Simon