Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chriss Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

printing from the page 1

Status
Not open for further replies.

arlequin

Programmer
Sep 21, 1999
232
UY
Hi people!!<br>
<br>
What's the best way to print a page from the internet?<br>
<br>
can I send the PRINT command to the browser?<br>
<br>
is there any javascript that prints the current page or an hyperlink?<br>
<br>
thansk
 
Hmm, I do not think that there is one to tell the browser to print the document (with javascript).<br>
<br>
My best suggestion is to make a copy of the page with a few modifyications: little images (no banner adds), and a plain background. <br>
<br>
then, use a &quot;Printer Friendly&quot; link to link to that page.<br>
<br>
also, have an onLoad event that triggers an alert, telling you how to print, based on which browser you are using.<br>
<br>
but again, there May be a really well hidden function that can be called from javascript to print the page. It would mostly be IE 5.0 specific, and be in the window.external subs.<br>
<br>
sorry I couldn't be of more help, <p>theEclipse<br><a href=mailto: > </a><br><a href=robacarp.webjump.com>robacarp.webjump.com</a><br>
 
Aaaaahh HA<br>
<br>
I stumbled upon something that might intrest you!!<br>
<br>
window.print <br>
<br>
try something like this on your printer-friendly page:<br>
<br>
&lt;SCRIPT LANGUAGE=&quot;javascript&quot;&gt;<br>
&lt;!--<br>
function printPage(){<br>
if (window.print){<br>
var conf=confirm('would you like to print this page?');<br>
if (conf){<br>
window.print()<br>
}<br>
} else {<br>
alert('please select file-print to print page');<br>
}<br>
}<br>
//--&gt;<br>
&lt;/script&gt;<br>
&lt;BODY onload=&quot;printPage()&quot;&gt; <p>theEclipse<br><a href=mailto: > </a><br><a href=robacarp.webjump.com>robacarp.webjump.com</a><br>
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top