Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 215859
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 11, 20262026-05-11T18:30:37+00:00 2026-05-11T18:30:37+00:00

So I have an ‘export’ application that arrives the user at an end page

  • 0

So I have an ‘export’ application that arrives the user at an end page with a textarea with lots of text. Now the workflow is to copy and paste that text from the textarea into a file.

The exported code is getting larger, and we want to encourage users to do this more often, so the copy/paste route is no longer desirable. (Not to mention that my xterm->ssh->screen->vi chain doesn’t paste 250K characters so well)

So the problem is this: I have a textarea that has exported code in it, and I want to provide a button that is ‘Download this Code to a file’

I’m fairly sure that I will have to hit the server again, but I just want to check all my bases. The ways I can think of doing this (sending generated textarea value as a file ot the browser)

  • Create a script that receives said text as a POST and sends it back with the right Content Headers. This is no desirable because we would be POSTing 250k, which would be slower than:

  • Create a script that regenerates the text area and provide a button the original page that hits the scripts and downloads the file. This is the option I am leaning towards

  • Use Javascript somehow and perhaps beable to skip the server all together and just send the $(‘.exported’).val() to the browser with the right headers? Not sure how to do this atm.

So if anyone has suggestions that’d be great, maybe I’m overlooking something. Thanks!

edit: Download textarea contents as a file using only Javascript (no server-side)

This question says the JS route is not possible (probable)

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-11T18:30:37+00:00Added an answer on May 11, 2026 at 6:30 pm

    I would go with option 2. Simplest and fastest. The other ones are a bit contrived.

    If you go with option 2, why even leave the textarea at all?

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Have an app that can use tts to read text messages. It can also
Have started playing with Xcode 4.2, and created a single page application using storyboard
Have you used VS.NET Architect Edition's Application and System diagrams to start designing a
Have a n-tire web application and search often times out after 30 secs. How
**Have it working now. I forgot to populate the Array List. How embarrassing. I'm
Have a bunch of WCF REST services hosted on Azure that access a SQL
Have a photography site that I want to prevent image copying from. How can
Have a look on following application http://itunes.apple.com/us/app/fatbooth/id372268904?mt=8 i think they are using the same
Have some dates in my local Oracle 11g database that are in this format:
have the following text file: <div> <asp:HyperLinkField HeaderText=Hello World of Regular Expression /> </div>

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.