Downloads

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
mintedjo
Forum Contributor
Posts: 153
Joined: Wed Nov 19, 2008 6:23 am

Downloads

Post by mintedjo »

Hello!

I have a function which is called using ajax.
The function generates an XML document that I need to present as a download to the user.

My question: is it possible to generate the document and initialise the download using ajax in the same way that you can use headers to declare something is a download?
I'm not sure if thats clear so I'll explain what I want a bit more...
User clicks button
Client sends request to server
Server responds and popup appears with the browsers download dialogue box.

Thanks
Joe
Post Reply