Win a copy of Rust Web Development this week in the Other Languages forum!
  • 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:
  • Tim Cooke
  • Campbell Ritchie
  • Ron McLeod
  • Liutauras Vilda
  • Jeanne Boyarsky
Sheriffs:
  • Junilu Lacar
  • Rob Spoor
  • Paul Clapham
Saloon Keepers:
  • Tim Holloway
  • Tim Moores
  • Jesse Silverman
  • Stephan van Hulst
  • Carey Brown
Bartenders:
  • Al Hobbs
  • Piet Souris
  • Frits Walraven

Simple Question

 
Ranch Hand
Posts: 34
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I am downloading an excel file to the client side using:
1. setContentType("application/excel") and
2. response.setHeader ("Content-Disposition", "attachment;filename=\""+requiredFileName+"\"");
It is successfully getting downloaded to the client end. Popping up windows dialog (Open-Save-Cancel-More Info). If I use save, everything is fine. But if I use Open, it opens up but there is a request process ongoing on the IE window Status bar.
Parent JSP/HTML has:
<a href="javascript:void(0);" onKlick="exportToExcel()">Export to Excel</a>
function exportToExcel() {
exportIFrame.location = "./destinationJSPName.jsp";
}
<IFRAME src="blank.html" id="exportIFrame" name="exportIFrame" FRAMEBORDER=0 SCROLLING=NO width="0" height="0">

Can anybody tell me what should I need to do, to avoid this request process ongoing on the status bar when you click 'Open' button?
Thanks
Nagesh.
 
Nagesh Rachakonda
Ranch Hand
Posts: 34
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I found the answer for the above.
Instead of using javascript:void(0) in the anchor tag, use just '#' will solve the problem.
Thanks for no replies.
 
Sheriff
Posts: 67618
173
Mac Mac OS X IntelliJ IDE jQuery TypeScript Java iOS
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Thanks for no replies.


This attitude is sure to make me rush to reply to a question of yours for which I do have an answer.
 
Consider Paul's rocket mass heater.
reply
    Bookmark Topic Watch Topic
  • New Topic