PDA

View Full Version : Print Frame Chrome



mansi752
Mar 24, 2011, 9:37 AM
I'm trying to print a pop up window using the following code :

window.frames['cInitChecksWindow_IFrame'].focus();
window.print();

When I view the print page the html of parent page is also passed along with pop-up window in Chrome. I just need the html of pop-up. This works fine in IE all versions with the same code.

(See the attachment for print images in IE and Chrome)

Any help on how to print in extjs controls in Chrome will be helpful?

GusMartins
Dec 23, 2013, 12:04 PM
Hello!

Were you able to solve your problem? Using your code in IE , it prints the content of the parent instead of the child.


var request = frontController + 'report/test?'
+ "p_cod_opcao=873&p_cod_rep=873&p_cod_mod=INT&p_dta _inicial=12/12/2013&p_dta_final=12/12/2013&p_cod_dest=&p_cod_esp=&p_tipo_serv=F";

//ext window with hidden iframe
var win = new Ext.Window ({
itemId: 'reportWindow',
width: 800,
height: 600,
title: 'Relatorio',
hidden:true,
modal:true,
html: '<iframe src="'+request+'" id="reportFrame" id="reportFrame" name="reportFrame" style="visibility:hidden;display:none" ></iframe>'
});
win.show();

//print works on CHROME
window.frames['reportFrame'].focus();
window.print();

Regards,
Gustavo

geoffrey.mcgill
Dec 23, 2013, 2:59 PM
Hi Gustavo,

Please wrap any code samples in [CODE] tags. See item #3 in the following guidelines:

http://forums.ext.net/showthread.php?10205-More-Information-Required