Board Thread:Support Requests - Getting Technical/@comment-26917000-20160422231028/@comment-26917000-20160428234506

Well, here's the JS code I'd be using for a certain wikia:

var ifrm = document.createElement('iframe');

var link; // the variable to be linked to a template

ifrm.setAttribute('id', 'ifrm'); // assign an id

//document.body.appendChild(ifrm); // to place at end of document

// to place before another page element

var el = document.getElementById('marker');

el.parentNode.insertBefore(ifrm, el);

// assign url

ifrm.setAttribute('src', 'p3d.in/' + link);

So my real question is, how can I set the variable through a template or any other wiki page? And the other one is  how can I invoke this once the code has been added at the Global.js?

EDIT: Thanks and sorry for answering my rather vague question.