iFrame (Print a page)

Yo.

I’m a little stuck, my main goal is to print a page without really opening it up (tab or external window)

So what I’m doing right now is using the “HTML” element and I choose “Display as an iFrame”
Put in my source; <iframe=“URL/Current cell`s uniqueid/”

Everything works up to this point, but now i need to print that “iFrame” with a button.

I use Toolbox plugin, and the workflow I run the code underneath with is “Run Javascript”

function loadOtherPage() {

$("<iFrame>")                                 // changed to the ID of the iFrame element
    .hide()                                         // hides after print
    .attr("src", "/url/to/page/to/print")  // I have changed the url 
    .appendTo("body");                     

}

and on the print page i use: On page load > Run Javascript

with the code
$(document).ready(function () {
window.print();
});

The thing i wanna get to work is the button “Print”

This topic was automatically closed after 70 days. New replies are no longer allowed.