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 1 of 1
  1. #1
    New to the CF scene
    Join Date
    Aug 2002
    Location
    Brasil
    Posts
    3
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Print another window from this window.

    Hi all!

    I have a function like this:

    {

    var relatorio;
    var printrelatorio;

    relatorio = open.window("..............");
    relatorio.document.open();
    relatorio.document.write("<HTML>");
    relatorio.document.write("<head><link rel='stylesheet' href='style_Microsoft.css' type='text/css' media='screen'>");
    .............
    printrelatorio =open.window("................");
    printrelatorio.document.write("<img src='print.gif' onClick='relatorio.print(); prntrelatorio.close();'>")
    ...............

    }

    At the "relatorio" window i write html code and, after that i open a second window (the printrelatorio). I put inside this 2nd window a print icon, and my scope is when user click this icon print the relatorio window. Using the code up is not work, the erro is when click the icon to print, "relatorio is not an object"...why it didn't see the other window?

    Thanks in advance.
    Last edited by Daniela; 08-23-2002 at 03:12 PM.


 

Posting Permissions

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