• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Determining if a download fails or when successful

 
Greenhorn
Posts: 8
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I need to download 100 MB files via HTTP.

I would like to make a Ajax call if either the download fails or when it is successful.

Any ideas?
 
Ranch Hand
Posts: 47
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Yes..you can do that easily using AJAX or DWR framework.You can determine whether the files are downloaded or not in the call back function the AJAX provides.There are lots of examples in the net.Recently i implemented one.
 
author
Posts: 15385
6
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Um, Ajax does not download file to the user's computer and JavaScript has no clue if a file actually made it to the client since it has no IO capabilities.

If you are talking about just displaying a large file in the browser which is text, than you can use Ajax.

Eric
 
Al Gettier
Greenhorn
Posts: 8
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I need to download a non-html or non-displayable file.

I was thinking maybe a subwindow and attaching javascript to the onreadystatechange of that subwindow's document for IE or a listener on the "DOMContentLoaded" for that subwindow for Firefox.
 
Don't get me started about those stupid light bulbs.
reply
    Bookmark Topic Watch Topic
  • New Topic