I have a problem with a Javascript trigger that produces HTML page for printing. It works fine in Storyline 2, but when implemented in Storyline 3 I get no response. Does anybody had such a problem, or knows how to overcome it?
Sharing your script might help, in addition to any error messages that might be seen in the browser. Remember, Articulate does not officially support javascript programming... though several very good javascript developers travel these forums
3 Replies
Sharing your script might help, in addition to any error messages that might be seen in the browser. Remember, Articulate does not officially support javascript programming... though several very good javascript developers travel these forums
Hi Brian, thanks for replying.
The code was actually taken from one of the threads here and worked fine in storyline 2.
I attached it in a Word file (or should I copy & paste)?
Ofer
Hello,
I'm having a similar problem and would really appreciate it if anyone was able to help.
Thanks
The javascript is as follows:
ar qs = ((window.location.search || '?').substr(1).split('&').map(function(ent) { return ent.split('='); }));
var module = (qs.filter(function (ent) { return ent[0] == 'module' }) || [[null, null]])[0][1],
endpoint = (qs.filter(function (ent) { return ent[0] == 'endpoint' }) || [[null, null]])[0][1];
endpoint = endpoint.replace('api/tincan/', '');
var el = document.createElement('a');
el.href = endpoint + 'learning-modules/complete?id=' + module;
el.target = '_top';
document.body.appendChild(el);
el.click();
This discussion is closed. You can start a new discussion or contact Articulate Support.