Possible Duplicate:
Download a file using jQuery after creating it in the server
I have a jQueryUI dialog which contains some HTML content. After user makes their input and clicks the OK button a call to the server is established with AJAX. Inside the referenced static method a file is created based on the user input. After the file is created the user should be able to download it. How do I achieve this? I’ve heard about “creating a form in that dialog where the action is POSTing to the server but I have no idea how to do this.
Note that this question covers the server side of the same issue.
Have your AJAX call create the file and store it on the server somewhere. In the
successhandler of your AJAX call, set the source of aniframeon your page to the URL of the created file.