dhvani Posted May 22, 2009 Share Posted May 22, 2009 Hi, I needs to print some invoices for my site. I am using javascript window.print() function.. I get the print but it is with header and footer which i don't want. Is there any way to remove it through javascript. Thanks, Dhvani Link to comment https://forums.phpfreaks.com/topic/159216-javascript-print/ Share on other sites More sharing options...
Axeia Posted May 22, 2009 Share Posted May 22, 2009 There's a better way to do the same thing, a stylesheet called for like this: <link rel="stylesheet" type="text/css" href="print.css" media="print" /> Then simply in print.css do something like #footer { display: none; } That way people don't need to have javascript enabled for a print friendly page either. Link to comment https://forums.phpfreaks.com/topic/159216-javascript-print/#findComment-839762 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.