• 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

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: 67747
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.
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
reply
    Bookmark Topic Watch Topic
  • New Topic