Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to print the contents of the JQuery ThickBox plugin?

I have implemented the ThickBox Plugin and I am retrieving the content from using an AJAX request. The print link is printing the page behind the Thickbox. Is there a way to print the actual content?

I am using the following anchor tag and JavaScript link:

<a onclick="PrintPage()">Print</a>

JavaScript:

    function PrintPage() {
        window.print();
    }

</script>
like image 326
Xaisoft Avatar asked Dec 01 '25 05:12

Xaisoft


1 Answers

You'll have to specify a CSS print stylesheet which hides everything except the ajax retrieved content.

like image 107
cgp Avatar answered Dec 03 '25 21:12

cgp



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!