Javascript : Extracting text entry data fields from storyline with output CSV or txt
Dec 09, 2015
Hi all
Need help. Tried several of the solutions posted on this forum but still can't seem to get the javascript to work. Im using windows 8.1 not sure if this matter. Below is the javascript that im using, let me know if there are any error you may find it. Or i would be thank ful if you can take a look at my storyline file. Thanks a million !!!
Script :
var fso = new ActiveXObject("Scripting.FileSystemObject");
var s = fso.OpenTextFile("C:\\Desktop\Enquiries.txt", 8, true, 0);
var player = GetPlayer();
var name = player.GetVar("TextEntry");
var email = player.GetVar("TextEntry1");
var telephone = player.GetVar("TextEntry2");
var enquiries = player.GetVar("TextEntry3");
s.WriteLine("Name: " + name);
s.WriteLine("Email: " + email);
s.WriteLine("Telephone: " + telephone);
s.WriteLine("Enquiries: " + enquiries);
s.WriteLine("==========");
s.Close();
3 Replies
Hello Gary,
This post might help : https://community.articulate.com/discussions/articulate-storyline/recording-user-s-name-and-email-address#73694
Hi Ademola
Yup tried it and the code is from the link u recommended. Doesn't seem to work.
Hi Gary,
I can't assist with the code, but did want to confirm you're testing the published output within the intended environment. Such elements as Javascript won't function within the preview or could encounter security restrictions when testing the published content locally.
This discussion is closed. You can start a new discussion or contact Articulate Support.