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 biv343 on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

print script on one page to actaully print another page

Status
Not open for further replies.

DrAsh

Technical User
May 3, 2001
46
US
I have a print page script. I want ot be able to insert it onto another page but when the user clicks the print, what actually will print is another webpage. ANyone know how.

Here's the print function:

<script>

// (C) 2000 // // Free for all users, but leave in this header

function printWindow(){
bV = parseInt(navigator.appVersion)
if (bV >= 4) window.print()
}


</script>

============================================================

Step 2.
Put the following in the body of your page.

<a href=&quot;javascript:printWindow()&quot;>Print This Page</a>

============================================================

Another script I got is this:
<SCRIPT LANGUAGE=&quot;JavaScript&quot;>

<!-- Begin
if (window.print) {
document.write('<form>Click Here To '
+ '<input type=button name=print value=&quot;Print&quot; '
+ 'onClick=&quot;javascript:window.print()&quot;> This Page!</form>');
}
// End -->
</script>

Someone know how to manipulate this.
 
You can't, there are no print options at all, but you can use some HTML:

<link rel=alternate media=print href=&quot;otherPage.htm&quot;>

This works for IE, and ofcourse doesn't for the joke browser.
b2 - benbiddington@surf4nix.com
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top