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

94
Vistas
Update html with js instead of creating new file

at this moment my script downloads html file with name(1), name(2) etc. I wonder if I can change this script to update local file and add value instead of downloading. Or second option can I somehow force html to look for file "INCFINDERdb("highestvalue").html" ?

function save() {
  var htmlContent = [document.getElementById('saveinc').value];
  var bl = new Blob(htmlContent, {
    type: "text/html"
  });
  var a = document.createElement("a");
  a.href = URL.createObjectURL(bl);
  a.download = "INCFINDERdb.html";
  a.hidden = true;
  document.body.appendChild(a);
  a.innerHTML = " random ";
  a.click();
}

document.addEventListener('DOMContentLoaded', function() {
  document.getElementById('click-me3').addEventListener('click', save);

});
<input type="text" id="saveinc">
<button class="button" id='click-me3'> Save INCs to ignore </button>

<div class="info-box">
  IGNORUJEMY TE CI
  <iframe src="/INCdb/INCFINDERdb.html" title="description"></iframe>

</div>

Later on I want to add remove option also with update does document.removeElement will work?

about 4 years ago · Juan Pablo Isaza
1 Respuestas
Responde la pregunta

0

chrome.downloads.onDeterminingFilename.addListener(function (item, suggest) {
    suggest({ filename: '..', conflictAction: 'overwrite' });
});

Fixed my problem

about 4 years ago · Juan Pablo Isaza Denunciar
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