Can jQuery retrieve a file?
- by danspants
I have a django application that creates xls and txt files.
I'm trying to create a button which sends a jQuery.get request to django, django then returns a freshly created file to jQuery which in turn pops open a save as dialog.
My code looks like this:
jQuery("#testButton").live("click",function()
{
jQuery.jGrowl("click");
jQuery.get("/filetest",function(data){});
});
<div id="testButton" class="button">CLICK TO TEST</div>
Getting the file to jQuery is easy, but I have no idea how to then raise a Save As dialog.
Any assistance would be fantastic!