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
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
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
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
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • 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.