File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes JSP and the fly likes Simple Question Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » JSP
Bookmark "Simple Question" Watch "Simple Question" New topic

Simple Question

Nagesh Rachakonda
Ranch Hand

Joined: Dec 04, 2003
Posts: 34
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?
Nagesh Rachakonda
Ranch Hand

Joined: Dec 04, 2003
Posts: 34
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.
Bear Bibeault
Author and ninkuma

Joined: Jan 10, 2002
Posts: 63865

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.

[Asking smart questions] [About Bear] [Books by Bear]
I agree. Here's the link:
subject: Simple Question
jQuery in Action, 3rd edition