Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 2 of 2
  1. #1
    New Coder
    Join Date
    Jun 2006
    Posts
    14
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Print target page, not current

    Hi. I'm trying to print a different page in my directory than the one I'm calling it from. Is this possible? What I want to have is a user presses a link, the link brings up a new popup window and then automatically prompts for a print job. What I'm getting now is the pop-up, and the print dialog prompt, but when I print, it prints the page I clicked on the link from, not the popup window. Any suggestions?
    Here's what I currently have:

    Code:
    <a href="#" title="Click For Printer Friendly Schedule" onClick="popup('www.cvhspreps.com/index2.php?option=com_football&task=viewteam&teamID=<?=$team->id ?>', 'Win1', 900, 600); javascript:window.print(); return false">
    				<img src="/images/M_images/printButton.png" border="0" alt="Click For Printer Friendly Schedule">Print <?=$team->name ?>'s 2006 Schedule</a>
    Thanks

  • #2
    Regular Coder
    Join Date
    Jun 2002
    Location
    Flint, Michigan, USA
    Posts
    627
    Thanks
    1
    Thanked 20 Times in 20 Posts
    Try this:
    Code:
    <a href="#" title="Click For Printer Friendly Schedule" onClick="PU1=window.open('www.cvhspreps.com/index2.php?option=com_football&task=viewteam&teamID=<?=$team->id ?>','Win1', 'width=900,height=600'); PU1.window.print(); return false">


  •  

    Posting Permissions

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