aspose file tools*
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
Author

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?
Thanks
Nagesh.
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
Marshal

Joined: Jan 10, 2002
Posts: 61221
    
  66

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] [Bear's FrontMan] [About Bear] [Books by Bear]
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Simple Question