What happened to the Messenger Plus! forums on msghelp.net?
Shoutbox » MsgHelp Archive » Messenger Plus! for Live Messenger » Scripting » [Help] Download progress?

[Help] Download progress?
Author: Message:
Eljay
Elite Member
*****

Avatar
:O

Posts: 2949
Reputation: 77
– / Male / –
Joined: May 2004
RE: [Help] Download progress?
quote:
Originally posted by CookieRevised
when you download a file with your browser, it usually tells you also how big the file is and thus being able to show you a progress dialog. So, find out how they do that (probably sending some kind of request first) and do the same in your script.

code:
var url  = 'http://www.google.co.uk/intl/en_uk/images/logo.gif';
var http = new ActiveXObject('Microsoft.XMLHTTP');
http.open('HEAD', url, true);
http.onreadystatechange = function(){
   if(http.readyState == 4){
      if(http.status == 200){
         Debug.Trace(http.getResponseHeader('Content-Length'));
      }
   }
}
http.send(null);


Doesn't always work though, depends if the header is sent (only seems to be sent on static files). No other way of getting the size before downloading that I know of...

This post was edited on 07-02-2008 at 07:54 PM by Eljay.
07-02-2008 07:53 PM
Profile PM Find Quote Report
« Next Oldest Return to Top Next Newest »

Messages In This Thread
[Help] Download progress? - by SmokingCookie on 07-01-2008 at 02:12 PM
RE: [Help] Download progress? - by Basilis on 07-01-2008 at 02:15 PM
RE: [Help] Download progress? - by mynetx on 07-01-2008 at 02:18 PM
RE: [Help] Download progress? - by SmokingCookie on 07-01-2008 at 02:19 PM
RE: [Help] Download progress? - by CookieRevised on 07-01-2008 at 09:33 PM
RE: [Help] Download progress? - by SmokingCookie on 07-02-2008 at 07:42 AM
RE: [Help] Download progress? - by CookieRevised on 07-02-2008 at 06:08 PM
RE: [Help] Download progress? - by Matti on 07-02-2008 at 06:16 PM
RE: [Help] Download progress? - by SmokingCookie on 07-02-2008 at 07:26 PM
RE: [Help] Download progress? - by CookieRevised on 07-02-2008 at 07:39 PM
RE: [Help] Download progress? - by SmokingCookie on 07-02-2008 at 07:46 PM
RE: [Help] Download progress? - by Eljay on 07-02-2008 at 07:53 PM
RE: [Help] Download progress? - by CookieRevised on 07-02-2008 at 08:11 PM
RE: [Help] Download progress? - by Eljay on 07-02-2008 at 08:16 PM
RE: [Help] Download progress? - by SmokingCookie on 07-03-2008 at 07:51 AM
RE: [Help] Download progress? - by CookieRevised on 07-03-2008 at 11:44 PM
RE: RE: [Help] Download progress? - by SmokingCookie on 07-04-2008 at 07:28 AM
RE: [Help] Download progress? - by Matti on 07-04-2008 at 08:58 AM
RE: [Help] Download progress? - by mynetx on 10-01-2008 at 09:41 AM
RE: [Help] Download progress? - by CookieRevised on 10-04-2008 at 08:51 AM


Threaded Mode | Linear Mode
View a Printable Version
Send this Thread to a Friend
Subscribe | Add to Favorites
Rate This Thread:

Forum Jump:

Forum Rules:
You cannot post new threads
You cannot post replies
You cannot post attachments
You can edit your posts
HTML is Off
myCode is On
Smilies are On
[img] Code is On