HTML5 progress bar with Javascript Logic

I want to have a hyperlink file download on hypertext in an html5
document. I want to link the tag to some vanilla javascript,
probably my ajax and XMLHttpRequest. I want to use the javascript
to examine the file download as it leaves the browser and goes to the download
client directory. I want to be able to display percentage completed,
bytes, kilobytes or Megabytes completed, at the instant the file download progress,
and to instantly update , irrespective of any length setting(s) on the progress bar.

I have not been able to debug my own javascript code, or any volunteer code from the internet, particularly code that does NOT use php or JQuery.

Can someone please respond with some vanilla javascript that runs correctly, in relation to my code fragment included down here, kindly, please?

<!-- from Arthurq Dent -->
<a id="fileLink" href="superman.png"> <!--  download="superman.png" -->
Download Superman Logo</a>.
<progress id="progress" value="0"></progress>
<script>
</script>

You need code on the server to tell you the progress, it’s not possible to know only from the frontend.

This topic was automatically closed 182 days after the last reply. New replies are no longer allowed.