SharePoint Dragons

Nikander & Margriet on SharePoint

Print friendly list items addition

Instead of the ultimate print function listed in https://sharepointdragons.com/2012/05/05/print-friendly-list-items/ :

<script type=”text/javascript”>
jQuery(function () {
//alert(‘print’);
window.print();
});
</script>

It’s better to do it like this to print the actual contents of the dialog window:

$(window).load(function () {

window.focus();

window.print();

});

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

%d bloggers like this: