Jump to content

Dynamically generate and download file/document using JavaScript


Jagand

Recommended Posts

Hi,

 

I would like to dynamically generate and download file such as example.txt using JavaScript. Using FSO OpenTextFile Method is saving but not mentioning the saved location. I would like the user to be prompted with options such as 'Save As', Open etc. How do I do this?

 

As always, Thank you.

That didn't make any sense, I'm afraid. If you want to send the users something from the server, then it has to be on the server in the first place. Same way you can't give someone a hundred dollars from your wallet, if you don't have a hundred dollars in it.

Also, we're not here to write the code for you, but to help you with problems with the code you've written yourself. So if you want help, you will have to post the code you already have. Otherwise we can't do anything but guess, and most of us are too busy to spend time on doing something that's ultimately mostly a waste of time.

 

If you want to make something server-side, then I recommend reading up on PHP and how it handles file uploads. If not, then see above.

 

PS: I strongly recommend that you read this article.

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.