Skip to content Skip to sidebar Skip to footer

Unable To Download Excel File Using Ajax Jquery

I have $.ajax({ url: 'service url', type: 'POST', async : true, contentType: false, processData: false, cache: false, success: function(data){ }, error:

Solution 1:

Content-Disposition will influence what happens when you load a resource in a browser window.

It doesn't do anything when you are handling the response manually with JavaScript.

If you want to trigger a download from that point, you'd need to handle the response, generate a data: scheme URI and set location to it.

It would be simpler to submit a form to the destination URL in the first place (unless you don't need POST in which case you can just set location to it).

Post a Comment for "Unable To Download Excel File Using Ajax Jquery"