Web Analytics Made Easy -
StatCounter Script for print? - CodingForum

Announcement

Collapse
No announcement yet.

Script for print?

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Script for print?

    Hi guys !

    Whats the script for linking to print?

    Any help is great

  • #2
    try this:
    Code:
    <script language="JavaScript">
    <!--
    if (window.print)
        document.writeln('<form><input type="button" value="Print" onClick="window.print()"><\/form>');
    //-->
    </script>
    it displays a button that the user can click, if their browser doesnt support it, it doesnt display.

    or if you want a text link, try this:
    Code:
    <script language="JavaScript">
    <!--
    if (window.print)
        document.writeln('<a href="#" onclick="window.print(); return false">Print this page</a>');
    //-->
    </script>
    happy coding
    Last edited by redhead; Jul 13, 2002, 10:15 AM.
    redhead

    Comment

    Working...
    X