Forum Discussion
BridgetODell
7 years agoCommunity Member
Build Custom Search within Storyline using JavaScript
Using JavaScript, follow these instructions to add a Custom Search Engine to your course. In 2018, I shared this functionality via a 5 minute Spark Presentation at the Chicago eLearning & Technology...
andreabauman
7 years agoCommunity Member
Hi Bridget,
This is great and exactly what I need. I am having trouble when I add more than one word. I am thinking it is in the code. Please see below and let me know what I am doing wrong.
When I type in the word development, the search function works beautifully, but not when I type in test. Assuming because code reads right to left.
var player = GetPlayer();
var parameters = player.GetVar("searchfield");
var lower = parameters.toLowerCase();
var key = "test = 10 development = 40";
var termlocation = key.search(lower);
player.SetVar("placement",termlocation);
Thank you for any help you can provide.