Go Premium for a chance to win a PS4. Enter to Win

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 200
  • Last Modified:

execute some HTML *only* after a download completes

Hi...
  Is there a way to have some HTML code executed ONLY after a downloaded file is *complete*? Is there some way to detect for this?
   Even to have a little "pop-up" window come up after the the download is complete, that would be fine too.

Thanks
   Shawn
0
aztec
Asked:
aztec
  • 6
  • 4
  • 3
  • +2
1 Solution
 
COBOLdinosaurCommented:
The answer is yes, sort of. HTML does not actually execute it just applies markup.  You can use JavaScript to do something dynamic using and onLoad event on the body tag.  If you could give us some detail of what you want to do, we can probably help.

Cd&
0
 
aztecAuthor Commented:
ok, I have one of these "Ad Tracker" things (www.hypertracker.com) and basically what I want to do is execute the following 'invisible' HTML code everytime a download of my demo is totally *completed* (not just invoked... completed):

<IMG SRC="http://hyperTracker.com/count.php?user=mycompany&name=my+demo+download&sales=0&description=&value=0.00&protection=default" BORDER="0" HEIGHT="1" WIDTH="1" ALT="">

This HTML code is invisible to the end-user (does not show a graphic or anything) - it simply tallies 1 to the count of downloads.

Currently, on my main page I have a link to the download page... and in the download page I have this HTML code to invoke an automatic download immediately:

<body onLoad='location="http://www.listmate.com/ddlmp/";' bgcolor="#FFFFFF">

...so I'm thinking if there was a way - when the download is complete - to pop up a little window which simply says "Thank you for downloading the demo...", and in that window is contained my invisible tracking HTML I mention above.

What do you think?

Thanks
   Shawn

 
0
 
COBOLdinosaurCommented:
I don't know what event you could use to trigger it.  There is nothing to indicate when a download is complete.  I think you have to handle the sount server side.

Cd&
0
Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
lexxwernCommented:
Basically you woant to count how many times a particular file has been downloaded. right?

for that as cd& said you need to do it server side. if you can use cgi's then the following site would interest you and they have free scripts for what you want.
http://cgi.resourceindex.com/
0
 
aztecAuthor Commented:
lexxwern - I just don't want to count when someone clicks on my file to download, I want to only count when the download has been completed.
   Do you know if any of those do that?

Thanks
   Shawn
0
 
aztecAuthor Commented:
hello?
0
 
dechCommented:
"and in that window is contained my invisible tracking
HTML I mention above."

lexxwern was refering to your tracking. You cant do this client side, only server side ...

Or ... put a counter in your popup. (just an idea)

dech
0
 
aztecAuthor Commented:
Do you know what is required "server side" to do this? I asked my web host, but he doesn't know how to do it. If this is not the correct topic for this question, please refer me to the properone.

Thanks
   Shawn

0
 
lexxwernCommented:
does your host allow scripting? if yes which scripting languages?
0
 
aztecAuthor Commented:
he can handle CGI and Perl
0
 
COBOLdinosaurCommented:
Even server scripting is not going to dependabley tell when a download has completed successfully.  

You may be able to script something to tell you when the last packet gets sent.  You can detect if tcp/ip completes the transfer.  However you cannot know from the srver side if the browser is even still running, or if the download successfully was transferd to disc or if the user is still on the site.

To know it succeeded.  The browser must come back to the server and say so.  It cannot do that automatically.  There does not seem to be a satifactory means of detecting it so a function can be triggered.  

That leaves one option.  Ask the user to ackowledge receiving the download successfully.

Yes maybe one additional option...  Continue wasting your time on it until the technology changes sometime in the future.

Cd&
0
 
COBOLdinosaurCommented:
This question has been abandoned. I will make a recommendation to the
moderators on its resolution in a week or two. I appreciate any comments
that would help me to make a recommendation.
<note>
   In the absence of responses, I will recommend DELETE where there is any
   question about its value as a PAQ.  Silence = you don't care
</note>

<greed> my points?</greed>

Cd&
0
 
aztecAuthor Commented:
you can delete it CD - I guess no such solution exists.

Shawn
0
 
lexxwernCommented:
RECOMMENDATION_________________



Zero Point PAQ



______________________________END
0
 
MoondancerCommented:
50 points refunded, item moved to our PAQ/closed.
Moondancer - EE Moderator
0

Featured Post

Important Lessons on Recovering from Petya

In their most recent webinar, Skyport Systems explores ways to isolate and protect critical databases to keep the core of your company safe from harm.

  • 6
  • 4
  • 3
  • +2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now