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 Quote Link to comment 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. Quote Link to comment 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. Quote Link to comment 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] Quote Link to comment 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 Quote Link to comment 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 Quote Link to comment 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] Quote Link to comment 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 Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.