You will be notified via email when the author replies to your comment. Please select a comment to reply. You can add your comment about this article using the form below. Make sure you provide a valid email address else you won't be notified when the author replies to your comment Please note that all comments are moderated and will be deleted if they are Not relavant to the article Spam Advertising campaigns or links to other sites Abusive content.
Please do not post code, scripts or snippets. Required Invalid Email Address. Security code:. Required Invalid security code.
ClearHeaders ; Response. ClearContent ; Response. Name ; Response. AddHeader "Content-Length", file. ToString ; Response. Flush ; Response. TransmitFile file. FullName ; Response. Improve this question.
I could be wrong but as far as I know you can't send multiple files to the client as a response. You may wish to compress the multiple files though. Add a comment. Active Oldest Votes. In a word or two , you don't. So essentially you have two options: Issue multiple requests, one for each "file" being downloaded. Add menu. Download and open pdf file using Ajax Posted by: admin November 20, Leave a comment. URL window. It is reusable. Hope that helps. You could use this plugin.
Do you have to do it with Ajax? How can I pass a password from a bash script to aptitude for installing mysql? Asked 11 years, 10 months ago. Active 1 year, 7 months ago. Viewed k times. I have an action class that generates a PDF. The contentType is set appropriately. Improve this question. Mike Nayn Nayn 3, 8 8 gold badges 36 36 silver badges 47 47 bronze badges.
Add a comment. Active Oldest Votes. Improve this answer. Community Bot 1 1 1 silver badge. Mayur Padshala Mayur Padshala 1, 2 2 gold badges 18 18 silver badges 19 19 bronze badges. Does it work on chrome? I can only see a blank pdf. Yes, it does work on all modern browsers. If you see a blank pdf, try running the ajax url in a new tab. If you get a blank screen there as well, might be a problem with the pdf itself.
If you do see a pdf file there and not in the downloaded file, do let me know on my email. This anchor element actually did not work for me on IE 11, Edge and Firefox. Show 7 more comments. BalusC BalusC 1. Once again: you do not need Ajax for this.
It's only asking for trouble. In some browsers the window. So, also do NOT use window. If the content-disposition is set to attachment , you will just get a Save as dialogue. The parent page will stay unchanged. There is a limited Url length. And the author is asking about POST. Show 10 more comments. URL window.
0コメント