Thread: Page Printing
Results 1 to 4 of 4
Related
-
Css Printing Problem Forum: CSS Forum
Replies: 2 -
Printing Forum: HTML Forum
Replies: 0 -
Non-printing of images...help me, please. Forum: Website Scripts Forum
Replies: 5 -
Printing with CSS Forum: CSS Forum
Replies: 3 -
printing Forum: CSS Forum
Replies: 5
-
09-22-2005, 02:26 AM #1
Page Printing
How do I print a page with a button the page is not needed to be seen on screen.
example - my name and address for those who want it
I have tried -
window.print("pagetobeprinted.htm")
but it didn't work, it printed the current page..Glenvern
-
09-25-2005, 12:09 PM #2
Re: Page Printing
what i would do is make 2 pages...
the first one has the content that you want...
the second one is for a frame in your first page...
use some javascript that will open a popup with the info you want then print it! then close it when it is done!
try this example:
HTML Code:<!--PAGE 1--> <html> <head> <meta http-equiv="Content-Type" content="text/html; charset=windows-1252"> <title>New Page 1</title> <script>function pgPrint(){ printwindow = window.open('page2.html', 'win', 'height=1,width=1,left=20,top=20,resizable=no,scrollbars=no,toolbar=no,status=no'); this.focus(); printwindow.close(); }</script> </head> <body> <input type="button" onclick="javascript:pgPrint();" name="printbutton" value="print stuff"> </body> </html>
HTML Code:<!--PAGE 2--> <html> <body onload="this.print();"> put your address or whatever here! </body> </html>
-
09-25-2005, 02:49 PM #3
Re: Page Printing
Thanx for the reply -
I have copied and pasted your suggestion into both pages -
excellent - it works just fine...
many thanx..Glenvern
-
09-25-2005, 08:54 PM #4
Re: Page Printing
no problem!