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

99
Views
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 answers
Answer question

0

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

Fixed my problem

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