D.S.R.Clark
06-01-2003, 10:35 PM
To whom it may concern,
I found this neat little script here in the site. But I would like it to do something a little different than it does. Currently it prints the page that it is loaded onto. I would like it to print a page of my chosing. For example: I load one page and it directs it to print another.
Can anyone please help. Here is the script below.
Thank you in advance.
David S. R. Clark
<!-- TWO STEPS TO INSTALL PRINT PAGE (AUTOMATIC):
1. Copy the coding into the HEAD of your HTML document
2. Add the onLoad event handler into the BODY tag -->
<!-- STEP ONE: Paste this code into the HEAD of your HTML document -->
<HEAD>
<SCRIPT LANGUAGE="JavaScript">
<!-- Begin
function printPage() {
if (window.print) {
agree = confirm('This page contains sensitive information that \nwe recommend you print a copy of at this time. \n\nOK to print now?');
if (agree) window.print();
}
}
// End -->
</script>
<!-- STEP TWO: Insert the onLoad event handler into your BODY tag -->
<BODY OnLoad="printPage()">
<p><center>
<font face="arial, helvetica" size="-2">Free JavaScripts provided<br>
by <a href="http://javascriptsource.com">The JavaScript Source</a></font>
</center><p>
<!-- Script Size: 0.79 KB -->
<!-- This script and many more are available free online at -->
<!-- The JavaScript Source!! http://javascript.internet.com -->
I found this neat little script here in the site. But I would like it to do something a little different than it does. Currently it prints the page that it is loaded onto. I would like it to print a page of my chosing. For example: I load one page and it directs it to print another.
Can anyone please help. Here is the script below.
Thank you in advance.
David S. R. Clark
<!-- TWO STEPS TO INSTALL PRINT PAGE (AUTOMATIC):
1. Copy the coding into the HEAD of your HTML document
2. Add the onLoad event handler into the BODY tag -->
<!-- STEP ONE: Paste this code into the HEAD of your HTML document -->
<HEAD>
<SCRIPT LANGUAGE="JavaScript">
<!-- Begin
function printPage() {
if (window.print) {
agree = confirm('This page contains sensitive information that \nwe recommend you print a copy of at this time. \n\nOK to print now?');
if (agree) window.print();
}
}
// End -->
</script>
<!-- STEP TWO: Insert the onLoad event handler into your BODY tag -->
<BODY OnLoad="printPage()">
<p><center>
<font face="arial, helvetica" size="-2">Free JavaScripts provided<br>
by <a href="http://javascriptsource.com">The JavaScript Source</a></font>
</center><p>
<!-- Script Size: 0.79 KB -->
<!-- This script and many more are available free online at -->
<!-- The JavaScript Source!! http://javascript.internet.com -->