Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

168
Vistas
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
Responde la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda