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
Solved

execute some HTML *only* after a download completes

Posted on 2002-04-17
15
177 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
Free Tool: IP Lookup

Get more info about an IP address or domain name, such as organization, abuse contacts and geolocation.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

 
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

Networking for the Cloud Era

Join Microsoft and Riverbed for a discussion and demonstration of enhancements to SteelConnect:
-One-click orchestration and cloud connectivity in Azure environments
-Tight integration of SD-WAN and WAN optimization capabilities
-Scalability and resiliency equal to a data center

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
div to fit another div 8 28
How to get bootstrap element to collapse at wider screen width 3 41
Insert Button on a table 16 38
Responsive Font Size 6 29
SASS allows you to treat your CSS code in a more OOP way. Let's have a look on how you can structure your code in order for it to be easily maintained and reused.
Use these top 10 tips to master the art of email signature design. Create an email signature design that will easily wow recipients, promote your brand and highlight your professionalism.
In this tutorial viewers will learn how add a scalable full-width header using CSS3. Create a new HTML document with an internal stylesheet. Set a tiled background.:  Create a new div and name it Header. Position it with position:absolute at the top…
Video by: Mark
This lesson goes over how to construct ordered and unordered lists and how to create hyperlinks.

829 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