Click to See Complete Forum and Search --> : Print from Frames


spazwhiplash
03-13-2003, 11:58 AM
Is anyone aware of a tag, Javascript, or other means to allow a frameset to automatically send *just* the content frame to the spooler, avoiding the "which frame do you want to print" dialog?

I thought I once saw a script that would send an alternative page to the printer when the user clicks file-print (to avoid the extra step of goint to a printer friendly page first). Was I dreaming (or perhaps drunk)?

Thanks!!!!

pyro
03-14-2003, 07:30 AM
To provide alternate content to print, you can add this to the <head> section of the page. <link rel=alternate media=print href="printversion.doc"> The problem with this is it will probably need to be added to your frameset page...

This may also work, though I've never tried it...

Add

<head>
<script langugage="javascript" type="text/javascript">
function printwin()
{
top.framename.print();
}
</script>
</head>
<body>
<a href="#" onclick="printwin(); return false;">Print this frame</a>
</body>