Solved

execute some HTML *only* after a download completes

Posted on 2002-04-17
15
152 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
  • 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
 
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
What Security Threats Are You Missing?

Enhance your security with threat intelligence from the web. Get trending threat insights on hackers, exploits, and suspicious IP addresses delivered to your inbox with our free Cyber Daily.

 

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

Threat Intelligence Starter Resources

Integrating threat intelligence can be challenging, and not all companies are ready. These resources can help you build awareness and prepare for defense.

Join & Write a Comment

Suggested Solutions

Do you want to insert HTML5 video into your site? This is the tutorial how to do so. What are the main advantages of HTML5 video? 1) Have good compression, good image quality, and low decode processor use. 2) It is royalty-free 3) It is easi…
Foreword (July, 2015) Since I first wrote this article, years ago, a great many more people have begun using the internet.  They are coming online from every part of the globe, learning, reading, shopping and spending money at an ever-increasing ra…
In this tutorial viewers will learn how to embed videos in a webpage using HTML5. Ensure your DOCTYPE declaration is set to HTML5: "<!DOCTYPE html>": Use the <video> tag to insert a video. Define the src as the URL of your video; this is similar to …
The viewer will learn the basics of jQuery including how to code hide show and toggles. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery…

746 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

Need Help in Real-Time?

Connect with top rated Experts

14 Experts available now in Live!

Get 1:1 Help Now