...

View Full Version : Print another window from this window.



Daniela
08-23-2002, 04:09 PM
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.



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum