Passing parameters to bespoke Javascript functions

Hi,

I've created a javascript file in the story_content folder, and added the src script line to the story_html5.html file.

In the javascript file, I have a few bespoke functions which require incoming parameters. I know how to use the GetPlayer feature to extract the variable values from Storyline, but I can't seem to pass those values though to the javascript function.  Is it possible to pass parameters ? My test functions won't even accept a string passed as a parameter.

For example :

trigger javascript : test1("this is an alert box")

javascript function :

function test1(p_text)

{

window.alert(p_text)

}

Hopefully, someone can help...

Stu

2 Replies