Member_2_99151
asked on
Export to CSV Button does not work on Internet Explorer
Hi all,
I have on a number of pages within a web app, code to generate a CSV file and download it via the browser.
This has been working fine, but now it seems to have stopped working in Internet Explorer!
Any ideas what has changed?
Many thanks,
James
I have on a number of pages within a web app, code to generate a CSV file and download it via the browser.
This has been working fine, but now it seems to have stopped working in Internet Explorer!
$('#csv_log_export').click(function ()
{
PopulateCsv();
var downloadLink = document.createElement("a");
downloadLink.href = AppViewModel.page_model.csv_data();
downloadLink.download = AppViewModel.page_model.csv_file_name();
document.body.appendChild(downloadLink);
downloadLink.click();
document.body.removeChild(downloadLink);
});
Any ideas what has changed?
Many thanks,
James
ASKER
Thanks for the input.
Unfortunately Flash is not an option due to the targeted platforms.
Are there any other options?
Unfortunately Flash is not an option due to the targeted platforms.
Are there any other options?
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Hi,
what kind of Javscript framework are you using?
Can you confirm that the code was run successful prior to a specific date?
Have you tested the functionality in other browsers like Firefox and Chrome?
As it seems that the CSV generation runs only on the client side, perhaps some sort of security update in IE which blocks this type of link generation / execution.
It might also help if you can show the function
Thanks
Rainer
what kind of Javscript framework are you using?
Can you confirm that the code was run successful prior to a specific date?
Have you tested the functionality in other browsers like Firefox and Chrome?
As it seems that the CSV generation runs only on the client side, perhaps some sort of security update in IE which blocks this type of link generation / execution.
It might also help if you can show the function
PopulateCsv()
as well as what is behindAppViewModel.page_model.csv_data()
andAppViewModel.page_model.csv_file_name()
Thanks
Rainer
ASKER
Makes a lot of sense to move in this direction for this....
Only a matter of time until the other browsers move in this direction.
Thanks
Only a matter of time until the other browsers move in this direction.
Thanks
This will not work on IE. You must use any server side code.
You can check with this example. -
Downloadify- http://davidwalsh.name/downloadify
However, you will require flash for this. You need to be careful in case you are designing the page for any tablet. Just check if the tablet supports flash.