PDA

View Full Version : ajax http post response for download



tvik
25 Aug 2009, 4:12 AM
I have a button which sends an HTTP POST to the server via Ext.Ajax.request and gets a PDF document in the response. How can I make the browser to do the usual behavior, downloading or displaying the non-HTML document?

I know if it were a GET request it would be enough to put this into the button's click event handler:
window.location='http://....';

However, I have to use POST. It would be great to stay at Ext.Ajax.request, but other solutions are also welcome.