Forum Discussion

JacobJensen's avatar
JacobJensen
Community Member
2 years ago

href in a variable

I have a small Javascript (below) that I want to create a hyperlink in a portion of the variable when it is displayed on the next slide. The idea is that the user will be able to keep adding new information to the "ActionItems" variable and have all the links available to them at the end of the course.

Here's my script:

var player = GetPlayer();
var newitem = player.GetVar("ActionItems") + "\nDownload the App on <a href=\"https://play.google.com/store\">Google Play</a>";
player.SetVar("ActionItems", newitem);

 

It shows all the text just fine, but no hyperlink.