change download file to use jQuery.ajax