• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

how to disable pop-up blocked message in IE6.0 onwards.

 
Greenhorn
Posts: 29
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi,

I am using new ie 6.0 to open the generated report. I have three scenarios to open the report (PDF,XLS, and RPT). RPT will open in new IE6.0. When i select first time. again i selected XLS and submitted then i got the message like "pop-up blocked. To see this pop-up or additional options click here......" like this message is coming. This is not the correct way to open the excel. Client is asking, when i click on the Excel need to ask open, save, or close. Please do the needful to resolve this issue. I am using Struts, Jsp, js. using IE6.0
 
author
Posts: 15385
6
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Well the pop up blocker is blocking window.open. How are you calling it that the browser is blocking it?

Eric
 
purushotham podaralla
Greenhorn
Posts: 29
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi Eric,

i am using the below piece of code to flush the data in the specified format.
when i click on submit button i will call on javascript method with the following.

window.open( urlContextValue+"/action.do?mode=generateReport","newwindow");

in .js i am caling generateReport action method. it will go to action method and do the rest of the work.

public ActionForward generateReport(ActionMapping mapping, ActionForm form, HttpServletRequest request, HttpServletResponse response) {
if("Excel".equals(FormatType)){
response.setContentType("application/vnd.ms-excel");
response.setHeader("Content-disposition", "attachment; filename= reprot.xls ");
}else if ("RPT".equals(FormatType)){
response.setContentType("application/x-rpt");
response.setHeader(Content-disposition", "attachment; filename= reprot.rpt");
}
byte[] backupDoc = VO.getContent();
ServletOutputStream outputStream = response.getOutputStream();
outputStream.write(backupDoc, 0, backupDoc.length);
outputStream.flush();
outputStream.close();
return null;
}

whenever i clcik on the submit button i want to open in new window if it is rpt. otherwise need to ask open, save, and close. to open PDF, Excel, and XML.

thanks for your response Eric.

Regards,
Purushotham
 
reply
    Bookmark Topic Watch Topic
  • New Topic