Javascript for printing html page works in storyline 2 but not in Storyline 3

Mar 14, 2018

Hi

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?

Thanks, Ofer

3 Replies
Lizzy Pidgeon

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.