Jump to content

print this page?(SOLVED)


r-it

Recommended Posts

I believe I might be able to help slightly. Do you want it automatically to be printed for the user? That's dealt with via. javascript - search for javascript print tutorial or something similar, a million results will surely come up.

If you're wanting to auto-print pages for your own personal needs it's a little harder... as the confirmation box will always need pressing for most people. I believe there are ways to get around it though, one I remember was to email the page to yourself and use a particular email client.
Link to comment
https://forums.phpfreaks.com/topic/26557-print-this-pagesolved/#findComment-121480
Share on other sites

thanks a lot lads, it works fine, but i have one more problem, is there a way to change the page format/size because when i was testing it,  some parts of hte page were not printed, or if i wanted to print a section of the page instead of the whole page, cud this also be done with javascript
Link to comment
https://forums.phpfreaks.com/topic/26557-print-this-pagesolved/#findComment-121490
Share on other sites

i seem to be havin a lot of problems. The thing is, the javascript for window.print works fine, but i wanna print a portion of a page and i used about.com's div and innerhtml script at this address [url=http://personalweb.about.com/od/copypastejavascripts/a/404_3scripts_3.htm]http://personalweb.about.com/od/copypastejavascripts/a/404_3scripts_3.htm[/url]and it doesnt work at all, i tried fixing what i thought were syntax errors on their side, it doesnt even go ino the script, plz help sum1
Link to comment
https://forums.phpfreaks.com/topic/26557-print-this-pagesolved/#findComment-122094
Share on other sites

Why dont you make a link on one page called print, this will take you to another page that is formatted and layed out the way you wish and just use <body onLoad="window.print()"> in the second page to bring up the print box.

[code]<html>
<head>
<title>Print</title>
</head>
<body onLoad="window.print()">
<?php
 
              #blah blah
?>

</body>
</html>[/code]
Link to comment
https://forums.phpfreaks.com/topic/26557-print-this-pagesolved/#findComment-122097
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.