What I am actually wanting is a div with only text in it, to pull up the printing options when you click on it anywhere. But I only want it to print what is inside the div and nothing else on the page. Sorta like printing text on a page but only certain text. It’s kinda confusing let me know if you don’t understand.
I’ve done something like this before… the problem is the browser, by default, will print the entire page. So the trick is to open up a new window with the content you want printed, then have the browser print the contents of that window.
I put together an example for you… it has a few variables you can modify such as “autoPrint” which when true will automatically start printing, well the print option window should pop up. Otherwise you need to click the print button inside the popup window. Then manually close the popup – I don’t think there is any way around that.