Jump to content

Dynamically generate and download file/document using JavaScript


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.

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • 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.