dcsimg
Display File Download Dialog using JavaScript
3 posts in topic
Flat View  Flat View
TOPIC ACTIONS:
 

Posted By:   Mahesh_Alse
Posted On:   Wednesday, April 11, 2001 12:59 AM

How can I explicitly force the File Download/Save Target As dialog to be displayed when following an anchor/href tag using JavaScript?

Re: Display File Download Dialog using JavaScript

Posted By:   Anonymous  
Posted On:   Friday, May 20, 2011 03:47 AM

How can I explicitly force the File Download/Save Target As dialog to be displayed when following an anchor/href tag using JavaScript?

Re: Display File Download Dialog using JavaScript

Posted By:   Anonymous  
Posted On:   Wednesday, July 28, 2010 09:05 AM

Download





Re: Display File Download Dialog using JavaScript

Posted By:   AlessandroA_Garbagnati  
Posted On:   Tuesday, April 24, 2001 10:00 AM

Hi,

When I write servlets I normally set the header with:



response.setHeader("Content-Disposition", "attachment; filename=" + filename);



But this is a java solution, and unless you can set headers with javascript I think that could be a problem.
Further information about the Content-Disposition header can be found at: http://globecom.net/ietf/rfc/rfc2183.html.


Be aware that there is a bug on some versions of Microsoft IE as reported by this BUG: Content-Disposition Attachment Headers Does Not Save File.
About | Sitemap | Contact