...

View Full Version : Print page?



Kristen
08-05-2002, 07:12 AM
I have searched and found a way to have a "Print this Page" link, but I was wondering if you can have a "Print Page" link for another page.

I ask for the sake of not loading a PDF file but instead being able to print it from a normal html document.

Possible or wishful thinking?

Thanks.

x_goose_x
08-05-2002, 05:23 PM
On main page add:



<a href="javascript: t=window.open('printpage.htm','','width=100,height=100,top=3000,left=3000'); setTimeout('t.window.close()',10000); t.blur(); window.focus();">Print</a>


On printer version of the page add:



<script>
function prnt() {
if (window.print) {
window.print();
}
}
window.onload=prnt;
</script>

Kristen
08-05-2002, 06:02 PM
Thanks so much :)

x_goose_x
08-06-2002, 09:53 PM
Another option is:

<link rel=alternate media=print href="printversion.doc">

But unfortunately only IE!

Peanut
10-02-2002, 04:29 PM
Hi folks, haven't been here for a while, other commitments....

However, I still know where to come to for good help ...

I have searched and found this post and utilized the code posted by x_goose_x to good effect, but I have one question...

When I click 'print' on the first page the browser print window is invoked but is not displayed, if you weren't expecting it you may not notice it has appeared in the taskbar. Is there any way I can get the browser print window to appear on the page where the 'Print' option is ?

BTW, thanks for saving me loads of time trying to code this goose.

Peanut. :D



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum