Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

166
Views
Write multiple times to a blob file js

I have a form with one dropdown list and I want when the user click on the save button to save the value of the selected option in a text file. The user can open the form several times and add others options. It should write the option in the same text file at the end of the previous data.

 <form>
    <div class="form-inline">
      <select name="option" id="data" class="form-control"></select>
    </div>
 </form>
                        
 <button type="button" onclick="saveToTextFile()" class="btn btnsecondary">Save</button>



            function saveToTextFile() {
            var x = document.getElementById("data").selectedIndex;
            var y = document.getElementsByTagName("option")[x].value;

            var blob = new Blob([y],
                    {type: "text/plain;charset=utf-8"});
            saveAs(blob, "static.txt");}

Any advice ? Thank you !

about 4 years ago · Juan Pablo Isaza
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!