Go Back   CodingForums.com > :: Client side development > JavaScript programming

Before you post, read our: Rules & Posting Guidelines

Reply
 
Thread Tools Rate Thread
Enjoy an ad free experience by logging in. Not a member yet? Register.
Old 04-27-2004, 11:46 PM   PM User | #1
Athmaus
New Coder

 
Join Date: Apr 2004
Posts: 72
Thanks: 0
Thanked 0 Times in 0 Posts
Athmaus is an unknown quantity at this point
Tracking Downloads

Here is the senario summarized:

When someone downloads a trial of our app, we need a conformation page to popup as soon as the download is complete for this app. the this app for stat purposes. If at all possible we only want to track unique completed downloads, but at this point we will take just the completed downloads. One this confo page will be a "tracking" link that will report back to the server that the app has been completed, for a paticular source.

I have everything else figured out but i do not know how get that confo page to popup once the app is done. Do any of you know how to accomplish this?

Thanks!!
Athmaus is offline   Reply With Quote
Old 04-28-2004, 04:12 AM   PM User | #2
glenngv
Supreme Master coder!


 
glenngv's Avatar
 
Join Date: Jun 2002
Location: Los Angeles, CA Original Location: Philippines
Posts: 10,241
Thanks: 0
Thanked 112 Times in 111 Posts
glenngv will become famous soon enough
I don't think it's possible to detect if download is complete. You can track how many times the file is "downloaded" (just like this forum does on thread attachments) but you don't know how many users actually cancels the downloading process. By "downloaded", I mean the request to fetch the file was processed by the server and the response to the client is already sent (Download dialog is displayed). By the time the user chooses Save or Open, javascript has no access to his choice, more so to the completeness of the download.
__________________
Glenn
_____________________________________________
Play Tower of Hanoi Android app (Ad-FREE!)
Play Tower of Hanoi Android app (FREE!)
Go to Tower of Hanoi Leaderboard
Play Tower of Hanoi Facebook app
glenngv is offline   Reply With Quote
Old 04-28-2004, 04:17 AM   PM User | #3
Athmaus
New Coder

 
Join Date: Apr 2004
Posts: 72
Thanks: 0
Thanked 0 Times in 0 Posts
Athmaus is an unknown quantity at this point
well i heard it was possible, and i thought asp would do it, but i got a big no on it, and someone said javascript might, so i am at a loss, but i have to figure out some way to work it heh.........
Athmaus is offline   Reply With Quote
Old 04-28-2004, 05:40 PM   PM User | #4
brothercake
Senior Coder


 
Join Date: Jun 2002
Location: near Oswestry
Posts: 4,508
Thanks: 0
Thanked 0 Times in 0 Posts
brothercake is an unknown quantity at this point
I don't think it's possible either, and certainly not with javascript - you've no way of knowing if somebody completely downloaded a file - all you can do is log how many start to download it.
__________________
"Why bother with accessibility? ... Because deep down you know that the web is attractive to people who aren't exactly like you." - Joe Clark
brothercake is offline   Reply With Quote
Old 04-28-2004, 05:52 PM   PM User | #5
Basscyst
Smokes a Lot


 
Join Date: Jul 2003
Location: CA, USA
Posts: 1,594
Thanks: 5
Thanked 20 Times in 20 Posts
Basscyst is on a distinguished road
Well. . .
Just a thought, IE only, but you could use ActiveX and JavaScript to check for the existance of the file and return the file size in case it allowed for a partial download. Don't have time to test or show an example but here is a good reference link. The more knowledgeable may be able to tell you if it is a waste of time to try or not.

http://www.webreference.com/js/column71/8.html

Basscyst
__________________
Helping to build a bigger box. - Adam Matthews

Last edited by Basscyst; 04-28-2004 at 05:54 PM..
Basscyst is offline   Reply With Quote
Old 04-28-2004, 05:59 PM   PM User | #6
Athmaus
New Coder

 
Join Date: Apr 2004
Posts: 72
Thanks: 0
Thanked 0 Times in 0 Posts
Athmaus is an unknown quantity at this point
this helps some.

All i am trying to do is get a page to popup once the download is complete. The tracking is more or less taken care of....if i cant get the popup to happen, i can't even start thinking about tracking lol

thanks for help thus far
Athmaus is offline   Reply With Quote
Old 04-28-2004, 07:15 PM   PM User | #7
Unit
Regular Coder

 
Join Date: Feb 2004
Location: WA
Posts: 213
Thanks: 0
Thanked 0 Times in 0 Posts
Unit is an unknown quantity at this point
You can do this in a server side language. All you need to do is serve the download using your own script rather than letting the web server do it. That way, you can detect when the user clicks cancel or when the download is complete. You can then update a database from this script and let the javascript on the HTML page poll for the completion of the download by querying the server. Kind of long winded, but technically it is feasible.
__________________
Nobody is Perfect. I am Nobody.
Unit is offline   Reply With Quote
Reply

Bookmarks

Jump To Top of Thread


Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +1. The time now is 04:25 PM.


Advertisement
Log in to turn off these ads.