Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. Web Development
  3. JavaScript
  4. Progress Bar

Progress Bar

Scheduled Pinned Locked Moved JavaScript
comjavajavascriptsysadmin
6 Posts 3 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • M Offline
    M Offline
    Manish K Agarwal
    wrote on last edited by
    #1

    I am using an ActiveX which is refered using tag in my JavaScript code. This javascript is used in a Java based web application. When user browse this page first time, my ActiveX get downloaded from server and installed on client machine. I want to show a progress bar when IE downloading ActiveX. Please suggest what apporach I can use to implement this.

    Manish Agarwal manish.k.agarwal @ gmail DOT com

    C T 2 Replies Last reply
    0
    • M Manish K Agarwal

      I am using an ActiveX which is refered using tag in my JavaScript code. This javascript is used in a Java based web application. When user browse this page first time, my ActiveX get downloaded from server and installed on client machine. I want to show a progress bar when IE downloading ActiveX. Please suggest what apporach I can use to implement this.

      Manish Agarwal manish.k.agarwal @ gmail DOT com

      C Offline
      C Offline
      C War
      wrote on last edited by
      #2

      The unfortunate thing is that you can't do a true progress bar, because you don't have access to the count of downloaded bytes. What most sites do is to display an animated gif image that acts as a placebo. It makes people feel like something is happening, but gives no true measure of it.

      M 1 Reply Last reply
      0
      • M Manish K Agarwal

        I am using an ActiveX which is refered using tag in my JavaScript code. This javascript is used in a Java based web application. When user browse this page first time, my ActiveX get downloaded from server and installed on client machine. I want to show a progress bar when IE downloading ActiveX. Please suggest what apporach I can use to implement this.

        Manish Agarwal manish.k.agarwal @ gmail DOT com

        T Offline
        T Offline
        twseitex
        wrote on last edited by
        #3

        readyState ========== Retrieves the current state of the object. Syntax Scripting [ vState = ] object.readyState Possible Values vState Variant that receives one of the following values.uninitialized Object is not initialized with data. loading Object is loading its data. loaded Object has finished loading its data. interactive User can interact with the object even though it is not fully loaded. complete Object is completely initialized. The property is read-only. The property has no default value. Remarks The states through which an object passes are determined by that object; an object can skip certain states (for example, interactive) if those states do not apply to that object. Standards Information There is no public standard that applies to this property. Applies To A, ACRONYM, ADDRESS, APPLET, AREA, B, BASE, BASEFONT, BDO, BGSOUND, BIG, BLOCKQUOTE, BODY, BR, BUTTON, CAPTION, CENTER, CITE, CODE, COL, COLGROUP, COMMENT, CUSTOM, DD, DEL, DFN, DIR, DIV, DL, DT, EM, EMBED, FIELDSET, FONT, FORM, FRAMESET, HEAD, hn, HR, HTML, I, IFRAME, INS, ISINDEX, KBD, LABEL, LEGEND, LI, LISTING, MAP, MARQUEE, MENU, namespace, nextID, NOBR, NOFRAMES, NOSCRIPT, OL, OPTION, P, PLAINTEXT, PRE, Q, RT, RUBY, S, SAMP, SELECT, SMALL, SPAN, STRIKE, STRONG, SUB, SUP, TEXTAREA, TITLE, TT, U, UL, VAR, XML, XMP ---------------------------------------------------------- [ nState = ] XMLHttpRequest.readyState Possible Values nState Integer that receives one of the following values.0 The object has been created, but not initialized (the open method has not been called). 1 The object has been created, but the send method has not been called. 2 The send method has been called, but the status and headers are not yet available. 3 Some data has been received. Calling the responseBody and responseText properties at this state to obtain partial results will return an error, because status and response headers are not fully available. 4 All the data has been received, and the complete data is available. The property is read-only. The property has no default value. Applies To XMLHttpRequest

        M 1 Reply Last reply
        0
        • C C War

          The unfortunate thing is that you can't do a true progress bar, because you don't have access to the count of downloaded bytes. What most sites do is to display an animated gif image that acts as a placebo. It makes people feel like something is happening, but gives no true measure of it.

          M Offline
          M Offline
          Manish K Agarwal
          wrote on last edited by
          #4

          Thanks for your reply. I was also thinking to do same but looking for somekind of notification when object is fully downloaded and I have to stop the animation.

          Manish Agarwal manish.k.agarwal @ gmail DOT com

          1 Reply Last reply
          0
          • T twseitex

            readyState ========== Retrieves the current state of the object. Syntax Scripting [ vState = ] object.readyState Possible Values vState Variant that receives one of the following values.uninitialized Object is not initialized with data. loading Object is loading its data. loaded Object has finished loading its data. interactive User can interact with the object even though it is not fully loaded. complete Object is completely initialized. The property is read-only. The property has no default value. Remarks The states through which an object passes are determined by that object; an object can skip certain states (for example, interactive) if those states do not apply to that object. Standards Information There is no public standard that applies to this property. Applies To A, ACRONYM, ADDRESS, APPLET, AREA, B, BASE, BASEFONT, BDO, BGSOUND, BIG, BLOCKQUOTE, BODY, BR, BUTTON, CAPTION, CENTER, CITE, CODE, COL, COLGROUP, COMMENT, CUSTOM, DD, DEL, DFN, DIR, DIV, DL, DT, EM, EMBED, FIELDSET, FONT, FORM, FRAMESET, HEAD, hn, HR, HTML, I, IFRAME, INS, ISINDEX, KBD, LABEL, LEGEND, LI, LISTING, MAP, MARQUEE, MENU, namespace, nextID, NOBR, NOFRAMES, NOSCRIPT, OL, OPTION, P, PLAINTEXT, PRE, Q, RT, RUBY, S, SAMP, SELECT, SMALL, SPAN, STRIKE, STRONG, SUB, SUP, TEXTAREA, TITLE, TT, U, UL, VAR, XML, XMP ---------------------------------------------------------- [ nState = ] XMLHttpRequest.readyState Possible Values nState Integer that receives one of the following values.0 The object has been created, but not initialized (the open method has not been called). 1 The object has been created, but the send method has not been called. 2 The send method has been called, but the status and headers are not yet available. 3 Some data has been received. Calling the responseBody and responseText properties at this state to obtain partial results will return an error, because status and response headers are not fully available. 4 All the data has been received, and the complete data is available. The property is read-only. The property has no default value. Applies To XMLHttpRequest

            M Offline
            M Offline
            Manish K Agarwal
            wrote on last edited by
            #5

            My js looks like as function fnLoadMyo() { window.status="Myo Loading.."; var s = '; document.getElementById('myoSection').innerHTML = s; alert(myo.readyState); } In above alert, I always get 4, irrespective of activex downloaded or registered on client or not.

            Manish Agarwal manish.k.agarwal @ gmail DOT com

            T 1 Reply Last reply
            0
            • M Manish K Agarwal

              My js looks like as function fnLoadMyo() { window.status="Myo Loading.."; var s = '; document.getElementById('myoSection').innerHTML = s; alert(myo.readyState); } In above alert, I always get 4, irrespective of activex downloaded or registered on client or not.

              Manish Agarwal manish.k.agarwal @ gmail DOT com

              T Offline
              T Offline
              twseitex
              wrote on last edited by
              #6

              create an activeX object don't forget 'OBJECT ID="' ... + '"' + ' CLASSID="' .... + '"' + ' TYPE="' .... + '"' .... e.g. "CLSID:22D6F312-B0F6-11D0-94AB-0080C74C7E95"; Mediaplayer Class-ID "application/x-oleobject" type of Class-ID and media ----------------------------------- create object directly, not with innerHTML. X12=document.createElement(....); X13=document.body.appendChild(X12); try { X13.classid=.... X13.type=.... } catch(e) { ... } or X12=document.createElement("); // e.g IE X13=document.body.appendChild(X12); after that maybe readystate is 4, but pointer X13 must be !=null and !=undefined X13.property too e.g. X14.classid at this point activex exists (installed an callable) e.g. Mediapalyer and try ..catch // - - - check MediaPlayer createable, only IE function checkMediaPlayer() { var X00=false; var X01; // ----- only if IE exist // ----- create X01=document.createElement("OBJECT"); // X01 mus be !=null and !=undefinded // ----- set object try-catch so no place for readystate try { // attention: activex must be allowed by user // maybe NOT possible // X01.classid="CLSID:22D6F312-B0F6-11D0-94AB-0080C74C7E95"; // X01.type="application/x-oleobject"; // X01.filename= ..... // dummy-wmv 1 sec must exists ! // maybe only that possible X01.type="application/x-mplayer2"; // EMBED and not activeX X01.filename= ..... // dummy-wmv 1 sec must exist ! } catch(e1) {X00=false;} // ----- no append to body so no remove from body if(X00) { try{X01.filename='';} catch(e3){X00=false;} } // ----- clear object X01=null; // no append to body so no remove from body return X00; }

              1 Reply Last reply
              0
              Reply
              • Reply as topic
              Log in to reply
              • Oldest to Newest
              • Newest to Oldest
              • Most Votes


              • Login

              • Don't have an account? Register

              • Login or register to search.
              • First post
                Last post
              0
              • Categories
              • Recent
              • Tags
              • Popular
              • World
              • Users
              • Groups