0

Hi everyone,
I have managed to call the window.print() in the javascript to printout my page. Does anyone knows how to remove the URL links, page number and others at the header and footer of the printout?
Or is it possible to modify the window.print settings so that it can remove the header and footer of the printout?
Please guide me along.Thanks

1
Contributor
1
Reply
2
Views
6 Years
Discussion Span
Last Post by strRusty_gal
0

Can someone explain the code to me?

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



   function ClickToPrint() {
        var DocumentContainer = document.getElementById('label');

        var WindowObject = window.open('', "TrackHistoryData", "width=420,height=225,top=0,left=0,toolbars=no,scrollbars=no,status=no,resizable=no");


        WindowObject.document.write(DocumentContainer.innerHTML);

        WindowObject.document.close();
        WindowObject.focus();
        WindowObject.print();
        WindowObject.close();


    }

Edited by Dani: Formatting fixed

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.