jquery ajax download
jquery ajax download
hi there, i am trying to pop up a download dialog after a link is clicked using jquery, i have tried this code but the download dialog is not popping up
- var options = {
type: "GET",
url: "FileHandler.ashx?download=1&filename=" + filename,
data: "{filename:'" + filename + "'}",
success: function(msg) {
- alert('success');
},
error: function(response)
{
alert('error');
}};
$.ajax(options);
the reason why i want to use an ajax request is that i want to have a callback function after the download is successful or not. the request to the generic handler seems to be working and i can see response using firebug but again the download dialog is not showing up