www.webdeveloper.com
Results 1 to 3 of 3

Thread: Need to know if download successful

  1. #1
    Join Date
    Jan 2010
    Posts
    7

    Need to know if download successful

    Hello,

    I have seen this question asked quite a few times, but I am yet to find an answer. I suspect because it can't be done?....

    If a web page has an anchor that the user can click to download a document, is there any way *on the client side* to know if they completed that download?

    So if I have something like this:
    Code:
    <a href="bigfile.zip" onclick="myOnClick(this);">Download Me</a>
    then I was hoping that there might be some way of being told when the file was downloaded. window.onload below doesn't work, but hopefully it'll illustrate what I'm trying to do:

    Code:
    <script type="text/javascript">
    function myOnClick(anchor)
    {
        window.onload = function(){alert(window.location);};
    
        window.location = anchor.href;
    }
    </script>

  2. #2
    Join Date
    Apr 2010
    Location
    Salem,Ma
    Posts
    623

  3. #3
    Join Date
    May 2003
    Location
    Between Baltimore and DC
    Posts
    3,579
    No way with html/javascript

    Eric
    Tech Author [Ajax In Action, JavaScript: Visual Blueprint] | twitter | linkedin | http://www.pascarello.com

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
HTML5 Development Center



Recent Articles