Articulate Storyline and JavaScript questions
Nov 18, 2013
Hello,
I am very new to Articulate Storyline and have been working with it for less than a week. I have a tight project deadline (Dec. 16,2013) and I am having a lot of trouble getting some things to work in regards to the JavaScript functionality. Two projects I have are interactive calculators. For each calculator, the math is done automatically as the user enters in data into the fields. I have made JavaScript code outside of Storyline that easily does thist, but I cannot bring it into Storyline without having issues. I want to make it so that JS calculation functions are automatically implemented whenever the value of a field changes. However, i cannot seem to figure out how to make this sort of functionality work in Storyline.
I attached working code to this post that I created in Notepad++. I honestly do not know how to get this code to work in Storyline :(.
Please, if anyone has any suggestions, I would appreciate it very much! I've been struggling for days....Thank you!
9 Replies
Hi Sara, sounds like your have experience in developing JavaScript and just need a way to connect it t Storyline. Here are some examples that will probably help you get started. There is also some info on how to keep your JavaScript functions in an external file and add it to your published content.
Hi Sara! Looks like Michael has popped in here to assist you, but I did want to welcome you to E-Learning Heroes
Hi,
i tried another time now with a very simple example for using Javascript with Storyline, display a window message, using this code:
>window.alert(‘Ciao!.’)<
I created a botton with a trigger, then i pubblished for Web and i checked Chrome available for use javascript!!!
I saw the Storyline Web for Javascritp, but it doesn't work nothing!!
(http://www.articulate.com/support/storyline/javascript-best-practices-and-examples)
Where i made errors! Thanks
I bought Articulate Storyline and i'm able to creato and use all commands! Help me! :(
I miss only the use of javascript and then I can start to do more complex projects
Thanks a lot. Ciao
Hi Stefano and welcome to Heroes!
I'm not someone who would know if something is off in your Javascript code, but you'll want to make sure that when you test your published output, you test it within the intended publish environment. So if you're publishing for web, you'll want to load up to a web site and test it from there (some free options are included here).
Stefano, as Ashley explained, you need to publish and upload your content to a server and the script will work. I just tried and it works.
You can also test the script without hosting it by using the CD publish option and running the file from your desktop.
I've not encountered any issues with this even though the final destination might be on a sharepoint site or web server. If it has worked on my desktop, it has worked everywhere else.
Thanks Owen and Michael!
how to get questioin list in javascript file ? g_listQuizzes is not working
Hi Ahmed,
I'm not sure if folks are still subscribed here, as the post is a bit older - but you could always use the "contact me" button on a ELH users' profile to reach out to them directly!
The javascript isn't something I can help with, but you may want to start with the best practices here.
Best of luck with your project!
This discussion is closed. You can start a new discussion or contact Articulate Support.