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

229
Views
How can I show download progress in a dialog box for a file download on browser
let bytes = new Uint8Array(data.length);
      for (var i = 0; i <data.length; i++) {
        bytes[i] =data[i];
      }
      let file = new Blob([bytes], { type: "text/xml" });
      let link = document.createElement("a");
      link.href = window.URL.createObjectURL(file);
      let fileName = "file.xml";
      link.download = fileName;
      link.click();
      this.openDialog();

I want to execute openDialog() method once the download is started on the browser. I tried to display the dialog box after the link.click() is executed but if the browsers 'Ask where to save each file before downloading' option is turned on the dialog box is displayed before the user selects the directory and clicks okay.

about 4 years ago · Santiago Trujillo
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!