Suppose I have a variable like this in JavaScript:
var h = "<html><head></head><body><h1>Example</h1><p>This is a variable I want to print to the printer with the browser!</p></body></html>" How can I send the pretty rendered content of this variable to the printer?
I've tried:
var w = window.open(); and then:
$(w).html(h); and then:
w.print(); But the thing is the Pop-up blocker blocks my new window with the printing page.
Anyone has any idea?
Thank you so much!