-4

I used download attribute to download the file. but it is not working in IE11. I want some other option to download the file in IE11.

a = document.createElement("a");
document.body.appendChild(a); 
a.style = "display: none"; 
a.href = url; 
a.download = fileName; 
a.click();
sayali
  • 11
  • 3
  • I used This Code // Create link. a = document.createElement( "a" ); // Set link on DOM. document.body.appendChild( a ); // Set link's visibility. a.style = "display: none"; // Set href on link. a.href = url; // Set file name on link. a.download = fileName; // Trigger click of link. a.click(); – sayali Feb 06 '17 at 10:46
  • Possible duplicate of [any clean ways to download files like html5 download attribute](http://stackoverflow.com/questions/16331666/any-clean-ways-to-download-files-like-html5-download-attribute) – Buh Buh Feb 06 '17 at 11:00

1 Answers1

0

download attribute is not support on IE11 . For details see a link:

developer.microsoft.com

For alternative way see below link of old SO question.

Any clean ways to download files like html5 download attribute

FileSaver will not automatically convert your HTML to PDF. Use jsPDF for PDF creation .

jsPdf in github.

jssPDF .

Demo Link.

Community
  • 1
  • 1
4b0
  • 21,981
  • 30
  • 95
  • 142
  • I refer your Link. I that I find the filesaver.js which is help to downloading text file. but my question is, I have generated pdf and I want to download that generated pdf. please help and thanks in advance for support – sayali Feb 06 '17 at 11:54