Use Javascript to integrate StoryLine Software and server side.

Jun 17, 2015

Hi There,

I need to provide server side functionality to storyline stories. I need to be able to store the variables value in the stores preferably by using a web service and store to our database. Going through the discussion forums on this website. I understand it is possible to do it using Javascript triggers. Can some one guide me , how these can be used? Any demo will be very helpful. Do you provide a Javascript file , that can be used to integrate between storyline and server side code.

I know, Jquery , Javascript, c# , asp.net and web service.

Please advise.

cheers!

Rachna

 

 

12 Replies
Rachna Mehta

Thanks Michael.

Once I get the variables using the Java script triggers and then how do I store them into a SQL database via WCF Service.

Do you have some examples?

Should I be putting all the published html source content and HTML files from Story Line in an asp.net project and use visual studio 2013 to attach it to a web service?
Is this the right way forward?

Cheers!
Rachna

Mark Bennett

What I usually do is create a hidden form and insert the storyline variables into those form fields and submit it to a PHP Script.

Example: Creates a handout(PDF) students can turn in.

http://nextgen.wvnet.edu/Courses/Math9/Unit1/Lesson2/activity3/story_html5.html


But like with anything server side you better have some checks.

Rachna Mehta

Thanks for your answer Mark. I am trying to do something similar. I have a button , 'Save'. When user clicks on the button save , i want to execute javascript and to begin with just display the value of the variable .

My variable name is %slider8%

I did try, some thing like alert('%slider8%'); and alert('slider8'); on the click of the button but it just displays %slider8% rather than the value that is stored in it should be 1 .

Also, in user.js the function GetHostVars() has all arguments as null.

Please advise, what I am doing wrong?

Thanks in advance.

Rachna Mehta

I thought, I would post my next query in this thread itself. It might help some one, doing something similar later. I am unable to find a function to load my variables from database . Something like a Onload of a layer.

What I want is, when a layer loads , my variables values that are stored in the database are read and assigned on the screen. For instance:- default value for a slider is 1 , so if user had choosen 3 last time and stored the value in the database, the value 3 should be read from the database on the layer load and the slider should be set to 3. Please advise.

Thanks in advance.

This discussion is closed. You can start a new discussion or contact Articulate Support.