Advanced Search

Results 1 to 3 of 3

Thread: Print Button On Web Page

  1. #1
    Join Date
    Mar 2006
    Posts
    41
    Thanks
    1
    Thanked 0 Times in 0 Posts

    Default Print Button On Web Page

    I'd like something like this:

    http://www.dynamicdrive.com/dynamicindex9/other1.htm

    But instead of a button, it needs to be a text link.

    Any ideas?

  2. #2
    Join Date
    Sep 2006
    Location
    St. George, UT
    Posts
    2,769
    Thanks
    3
    Thanked 157 Times in 155 Posts

    Default

    If you want to use that script, simply change this line:

    Code:
        document.write('<form><input type=button value="Print this Page" name="Print" onClick="printit()"></form>');
    to this:

    Code:
        document.write('<a href="#" onClick="printit(); return false;">Print The Page</a>');
    Hope this helps.
    "Computer games don't affect kids; I mean if Pac-Man affected us as kids, we'd all be running around in darkened rooms, munching magic pills and listening to repetitive electronic music." - Kristian Wilson, Nintendo, Inc, 1989
    TheUnlimitedHost | The Testing Site | Southern Utah Web Hosting and Design

  3. #3
    Join Date
    Mar 2006
    Posts
    41
    Thanks
    1
    Thanked 0 Times in 0 Posts

    Default

    I've also seen this:
    <a href="javascript:window.print()">Print</a>
    Which seems disturbingly simple. It seems to work, am I missing something?

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •