windows popup close before display dos . xls
- by Edgar Trejo
Good morning!
I'm trying to display a document. Xls in a popup window on IE8 but before showing the window closes automatically.
Here I show the code
javascript:
function hacerExportarExcel(){
var url = contextPath + "/exportarCarteraCreditoExcel.do"
window.setTimeout("window.open('"+url+"', '_blank', 'width=950,height=500,scrollbars=yes')",1000);
}
action:
try {
response.setContentType("application/vnd.ms-excel");
response.setHeader("Content-Disposition", "inline; filename=ConsultaCartera.xls");
consulta.setPdf(response.getOutputStream());
administracionCreditoConsulta.exportarCarteraCreditoExcel(consulta);
} catch (Exception e) {
logger.logError(e);
} finally {
response.getOutputStream().flush();
response.getOutputStream().close();
}
Can someone please help me!
Thanks!