Empresas
Empregos
  • Sobre nós
  • Soluções
    • Publicação de vagas
      Publique sua vaga e receba candidatos qualificados em 48h.
    • Avaliações de candidatos
      Mais de 500 testes técnicos e psicológicos, mais anti-fraude.
    • Headhunting
      Busca executiva personalizada do início ao fim.
    • Folha de Pagamento + EOR
      Dispersão de folha e EOR em mais de 15 países da LATAM.
  • Preços
  • Empregos

0

93
Visualizações
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 Respostas
Responde à pergunta

0

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

Fixed my problem

about 4 years ago · Juan Pablo Isaza Relatório
Responde à pergunta
Encontrar trabalhos remotos

Descubra a nova forma de encontrar um emprego!

melhores empregos
Principais categorias de trabalho
Empresas
Postar vaga Preços Comercial
Jurídico
Termos e Condições Política de privacidade
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomende algumas ofertas para mim
Preciso de ajuda