Solved

execute some HTML *only* after a download completes

Posted on 2002-04-17
15
194 Views
Last Modified: 2010-04-09
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
Comment
Question by:aztec
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 6
  • 4
  • 3
  • +2
15 Comments
 
LVL 53

Expert Comment

by:COBOLdinosaur
ID: 6948585
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
 

Author Comment

by:aztec
ID: 6949055
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
 
LVL 53

Expert Comment

by:COBOLdinosaur
ID: 6950257
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
WordPress Tutorial 1: Installation & Setup

WordPress is a very popular option for running your web site and can be used to get your content online quickly for the world to see. This guide will walk you through installing the WordPress server software and the initial setup process.

 
LVL 12

Expert Comment

by:lexxwern
ID: 6964721
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
 

Author Comment

by:aztec
ID: 6964745
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
 

Author Comment

by:aztec
ID: 6975346
hello?
0
 
LVL 2

Expert Comment

by:dech
ID: 7020127
"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
 

Author Comment

by:aztec
ID: 7020139
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
 
LVL 12

Expert Comment

by:lexxwern
ID: 7020590
does your host allow scripting? if yes which scripting languages?
0
 

Author Comment

by:aztec
ID: 7020617
he can handle CGI and Perl
0
 
LVL 53

Expert Comment

by:COBOLdinosaur
ID: 7021564
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
 
LVL 53

Expert Comment

by:COBOLdinosaur
ID: 7082595
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
 

Author Comment

by:aztec
ID: 7082816
you can delete it CD - I guess no such solution exists.

Shawn
0
 
LVL 12

Expert Comment

by:lexxwern
ID: 7082903
RECOMMENDATION_________________



Zero Point PAQ



______________________________END
0
 
LVL 1

Accepted Solution

by:
Moondancer earned 0 total points
ID: 7112281
50 points refunded, item moved to our PAQ/closed.
Moondancer - EE Moderator
0

Featured Post

Don't Cry: How Liquid Web is Ensuring Security

WannaCry is just the start. Read how Liquid Web is protecting itself and its customers against new threats.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This article explains how to prepare an HTML email signature template file containing dynamic placeholders for users' Azure AD data. Furthermore, it explains how to use this file to remotely set up a department-wide email signature policy in Office …
The article shows the basic steps of integrating an HTML theme template into an ASP.NET MVC project
The viewer will the learn the benefit of plain text editors and code an HTML5 based template for use in further tutorials.
Video by: Mark
This lesson goes over how to construct ordered and unordered lists and how to create hyperlinks.

617 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question