Win a copy of OCP Oracle Certified Professional Java SE 11 Programmer I Study Guide: Exam 1Z0-815 this week in the Programmer Certification 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 all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Liutauras Vilda
  • Junilu Lacar
  • Jeanne Boyarsky
  • Bear Bibeault
Sheriffs:
  • Knute Snortum
  • Devaka Cooray
  • Tim Cooke
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • Ron McLeod
  • Carey Brown
Bartenders:
  • Paweł Baczyński
  • Piet Souris
  • Vijitha Kumara

jQuery download works in Chrome and not in Explorer

 
Ranch Hand
Posts: 40
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I am using the following code to download a file to the desk top:



This works in Chrome. In Explorer the download does not occur and there is no error in the console.

Kind regards,

Glyn

 
Saloon Keeper
Posts: 10785
231
  • Likes 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Internet Explorer doesn't support the download attribute.

Your best bet is to just host the data on the server-side and set the Content-Disposition header. If that is not an option, you might try using a data URL instead and set the MIME type to application/octet-stream, but I'm not sure if that will work.
 
Greenhorn
Posts: 26
  • Likes 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Internet Explorer doesn't support the download attribute on tags.
Try using: navigator.msSaveBlob(blob, fileName);

Do refer this link : http://danml.com/download.html
 
Glyndwr Bartlett
Ranch Hand
Posts: 40
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Sherin,

I was not notified of your response and have just read it, after finding this solution independently and returning to post the solution. Thank your very much and it is a shame I did not read your answer earlier.

Kind regards,

Glyn
 
Barry's not gonna like this. Barry's not gonna like this one bit. What is Barry's deal with tiny ads?
Java file APIs (DOC, XLS, PDF, and many more)
https://products.aspose.com/total/java
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!