View Full Version : Problem while downloading word document using Iframe in IE.

22 Jan 2013, 1:00 AM

I have a button in my screen. On clicking that button , I want to pass control to action which will create word document and the user will see download window to download it in local directory. I have done this using Iframe and it is working fine in Mozilla, but is IE all version when I am clicking that button, I am getting 'Unknown Runtime error'. My code is as follows:

//JS file code.
var resultUrl = 'issuerSetupController/generateClientMemo.action';

Ext.getCmp('clientMemo.ice.hidden.label').update('<iframe src = \"' + resultUrl + '\" width=\"100%" height=\"400px"\"></iframe>' || '');

//Controller code
response.setHeader("Content-disposition", "attachment;filename=" + "document.docx");
// InputStream inputStream = new FileInputStream(file);
OutputStream outputStream = response.getOutputStream();
// IOUtils.copy(inputStream, outputStream);
documentGenerator.generateDocument(formatString, outputStream);

Please help me as I got stuck because of this.

23 Jan 2013, 12:44 PM
I don't see how this relates to Ext JS 3 from what you have provided.