SitePoint Sponsor

User Tag List

Results 1 to 4 of 4
  1. #1
    SitePoint Guru
    Join Date
    Apr 2001
    Location
    BC, Canada
    Posts
    630
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    pop up print window

    Hey all...
    Heres what Im trying to do

    Need to have a window pop up, to a size and go to a particular page. That I can do. Now in this popup, I need to have a link that can be used to print the contents of the window.


    possible?

  2. #2
    SitePoint Zealot
    Join Date
    Dec 1999
    Posts
    137
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    If you need to print the content of the popup:

    <a href="javascript:window.print()">Blah Blah</a>

    If you need to print the content of the parent window:

    <a href="javascript:window.opener.print()">Blah Blah 2</a>



    Hope that helps

  3. #3
    SitePoint Guru
    Join Date
    Apr 2001
    Location
    BC, Canada
    Posts
    630
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Both of them are printing hte parent window

  4. #4
    SitePoint Wizard silver trophy Jeremy W.'s Avatar
    Join Date
    Jun 2001
    Location
    Toronto, Canada
    Posts
    9,121
    Mentioned
    2 Post(s)
    Tagged
    0 Thread(s)
    Well, if you want a crap workaround to print the child, try:

    self.print()

    or window.opener.windowname.print()

    change windowname to whatever you've called the new window.

    Also, window.opener.print() will print the current window if the parent window's URL has changed since being opened.
    SVP Marketing, SoCast SRM
    Personal blog: Strategerize
    Twitter: @jeremywright


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
  •