r-it Posted November 8, 2006 Share Posted November 8, 2006 hi, can anyone help mi i dont know where to start with printing a page, i dunno where to start. would anyone please provide me with a link to the right documentation or give me some advice, chao thanx Link to comment https://forums.phpfreaks.com/topic/26557-print-this-pagesolved/ Share on other sites More sharing options...
Cep Posted November 8, 2006 Share Posted November 8, 2006 In your browser go file -> printIf thats not helpful then maybe you should provide more definitive information to your question. Link to comment https://forums.phpfreaks.com/topic/26557-print-this-pagesolved/#findComment-121479 Share on other sites More sharing options...
Anidazen Posted November 8, 2006 Share Posted November 8, 2006 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 More sharing options...
AndyB Posted November 8, 2006 Share Posted November 8, 2006 [code]<a href="javascript:window.print()">Print Page</a>[/code] Link to comment https://forums.phpfreaks.com/topic/26557-print-this-pagesolved/#findComment-121484 Share on other sites More sharing options...
r-it Posted November 8, 2006 Author Share Posted November 8, 2006 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 More sharing options...
r-it Posted November 9, 2006 Author Share Posted November 9, 2006 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 More sharing options...
Round Posted November 9, 2006 Share Posted November 9, 2006 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 More sharing options...
r-it Posted November 9, 2006 Author Share Posted November 9, 2006 thanx a lot lads u've bin major help, this works perfectly. I'll get into innerhtml things when i get a chance 2 learn ajax Link to comment https://forums.phpfreaks.com/topic/26557-print-this-pagesolved/#findComment-122108 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.