Web Form Progress Bar

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • aj

    #1

    Web Form Progress Bar

    Alan, you can achieve this by using XMLHttp Async
    functionality in a javascript file.

    Create an aspx page in which execute long running SQL
    query, then do an XMLhttp post to that page from a js
    function.


    In the javascript create 2 funtion
    Call LoadData in the window onload event.

    var objXMLReq;
    function LoadData() {
    objXMLReq = new ActiveXObject
    ("Microsoft.XML Http");
    var DataUrl = 'http://localhost/Query.aspx';

    objXMLReq.onrea dystatechange =
    ManageASyncXMLH TTPOperation;
    objXMLReq.open( "POST", DataUrl, true);
    objXMLReq.setRe questHeader('Co ntent-
    type', 'text/xml');
    objXMLReq.send( );

    //Display Progress bar("Retrieving data...");
    }

    function ManageASyncXMLH TTPOperationDTL () {
    switch (objXMLReq.read yState) {

    case 2, 3:
    break;

    case 4:
    //Hide the progress bar
    //Display the data
    div.innherText= objXMLReq.respo nseText;
    }
    }
    [color=blue]
    >-----Original Message-----
    >Does anyone know of web form Progress Bar controls or[/color]
    simulations for[color=blue]
    > long-running SQLServer process?
    >
    > Is it possible to use a conceptual method such as
    >
    > 1. Have SQLServer post status updates or number of[/color]
    seconds elapsed to[color=blue]
    > database table, and
    >
    > 2. Have web form post commands to retrieve data from[/color]
    the table based[color=blue]
    >on a timer, but inhibit web form redrawing until[/color]
    SQLServer table progress[color=blue]
    >numbers
    >pass certain threshholds?
    >
    > Thanks.
    >
    > Alan
    >______________ _____________
    >Alan Z. Scharf
    >GrapeVine Systems
    >New York City
    >
    >
    >.
    >[/color]
  • Rick Strahl [MVP]

    #2
    Re: Web Form Progress Bar

    Downside here is it'll only work with IE. For multi-browser this is not an
    option.

    If only the HTML standard or JScript would include a standard built in HTTP
    component - so useful in so many situations.

    +++ Rick ---

    --

    Rick Strahl
    West Wind Technologies


    ----------------------------------
    Making waves on the Web


    "aj" <jathanamit@yah oo.com> wrote in message
    news:0baa01c361 c1$bb15b410$a00 1280a@phx.gbl.. .[color=blue]
    > Alan, you can achieve this by using XMLHttp Async
    > functionality in a javascript file.
    >
    > Create an aspx page in which execute long running SQL
    > query, then do an XMLhttp post to that page from a js
    > function.
    >
    >
    > In the javascript create 2 funtion
    > Call LoadData in the window onload event.
    >
    > var objXMLReq;
    > function LoadData() {
    > objXMLReq = new ActiveXObject
    > ("Microsoft.XML Http");
    > var DataUrl = 'http://localhost/Query.aspx';
    >
    > objXMLReq.onrea dystatechange =
    > ManageASyncXMLH TTPOperation;
    > objXMLReq.open( "POST", DataUrl, true);
    > objXMLReq.setRe questHeader('Co ntent-
    > type', 'text/xml');
    > objXMLReq.send( );
    >
    > //Display Progress bar("Retrieving data...");
    > }
    >
    > function ManageASyncXMLH TTPOperationDTL () {
    > switch (objXMLReq.read yState) {
    >
    > case 2, 3:
    > break;
    >
    > case 4:
    > //Hide the progress bar
    > //Display the data
    > div.innherText= objXMLReq.respo nseText;
    > }
    > }
    >[color=green]
    > >-----Original Message-----
    > >Does anyone know of web form Progress Bar controls or[/color]
    > simulations for[color=green]
    > > long-running SQLServer process?
    > >
    > > Is it possible to use a conceptual method such as
    > >
    > > 1. Have SQLServer post status updates or number of[/color]
    > seconds elapsed to[color=green]
    > > database table, and
    > >
    > > 2. Have web form post commands to retrieve data from[/color]
    > the table based[color=green]
    > >on a timer, but inhibit web form redrawing until[/color]
    > SQLServer table progress[color=green]
    > >numbers
    > >pass certain threshholds?
    > >
    > > Thanks.
    > >
    > > Alan
    > >______________ _____________
    > >Alan Z. Scharf
    > >GrapeVine Systems
    > >New York City
    > >
    > >
    > >.
    > >[/color][/color]


    Comment

    • Alan Z. Scharf

      #3
      Re: Web Form Progress Bar

      aj,

      Thanks very much for your detailed reply.

      I've had so many people tell me progress bars for backend SQL queries
      couldn't be done in web forms.

      Both your generous recommendation and the other extensive responses here
      regarding multithreading convince me that there's always a way o do
      something.

      Regards,

      Alan


      "aj" <jathanamit@yah oo.com> wrote in message
      news:0baa01c361 c1$bb15b410$a00 1280a@phx.gbl.. .[color=blue]
      > Alan, you can achieve this by using XMLHttp Async
      > functionality in a javascript file.
      >
      > Create an aspx page in which execute long running SQL
      > query, then do an XMLhttp post to that page from a js
      > function.
      >
      >
      > In the javascript create 2 funtion
      > Call LoadData in the window onload event.
      >
      > var objXMLReq;
      > function LoadData() {
      > objXMLReq = new ActiveXObject
      > ("Microsoft.XML Http");
      > var DataUrl = 'http://localhost/Query.aspx';
      >
      > objXMLReq.onrea dystatechange =
      > ManageASyncXMLH TTPOperation;
      > objXMLReq.open( "POST", DataUrl, true);
      > objXMLReq.setRe questHeader('Co ntent-
      > type', 'text/xml');
      > objXMLReq.send( );
      >
      > //Display Progress bar("Retrieving data...");
      > }
      >
      > function ManageASyncXMLH TTPOperationDTL () {
      > switch (objXMLReq.read yState) {
      >
      > case 2, 3:
      > break;
      >
      > case 4:
      > //Hide the progress bar
      > //Display the data
      > div.innherText= objXMLReq.respo nseText;
      > }
      > }
      >[color=green]
      > >-----Original Message-----
      > >Does anyone know of web form Progress Bar controls or[/color]
      > simulations for[color=green]
      > > long-running SQLServer process?
      > >
      > > Is it possible to use a conceptual method such as
      > >
      > > 1. Have SQLServer post status updates or number of[/color]
      > seconds elapsed to[color=green]
      > > database table, and
      > >
      > > 2. Have web form post commands to retrieve data from[/color]
      > the table based[color=green]
      > >on a timer, but inhibit web form redrawing until[/color]
      > SQLServer table progress[color=green]
      > >numbers
      > >pass certain threshholds?
      > >
      > > Thanks.
      > >
      > > Alan
      > >______________ _____________
      > >Alan Z. Scharf
      > >GrapeVine Systems
      > >New York City
      > >
      > >
      > >.
      > >[/color][/color]


      Comment

      • Lewis Wang [MSFT]

        #4
        Re: Web Form Progress Bar

        Hi Alan,

        I have replied your post in another
        thread<microsof t.public.dotnet .framework.aspn et.webcontrols> , titled: <Web
        Form Progress Bar Control>.

        I past the link here for your reference:


        DHA.2448%40TK2M SFTNGP09.phx.gb l&rnum=1&prev =/groups%3Fq%3DWe b%2BForm%2BProg r
        ess%2BBar%2BCon trol%2B%2Bv-lwang%26hl%3Den %26lr%3D%26ie%3 DUTF-8%26oe%3DUTF-8
        %26selm%3DOiAxC ajYDHA.2448%254 0TK2MSFTNGP09.p hx.gbl%26rnum%3 D1

        Best regards,
        Lewis

        This posting is provided "AS IS" with no warranties, and confers no rights.



        --------------------
        | Reply-To: "Alan Z. Scharf" <ascharf@grapev ines.com>
        | From: "Alan Z. Scharf" <ascharf@grapev ines.com>
        | References: <#0n3U7bYDHA.22 00@TK2MSFTNGP09 .phx.gbl>
        <0baa01c361c1$b b15b410$a001280 a@phx.gbl>
        | Subject: Re: Web Form Progress Bar
        | Date: Thu, 14 Aug 2003 04:13:21 -0400
        | Lines: 89
        | X-Priority: 3
        | X-MSMail-Priority: Normal
        | X-Newsreader: Microsoft Outlook Express 6.00.3718.0
        | X-MimeOLE: Produced By Microsoft MimeOLE V6.00.3718.0
        | Message-ID: <eBfIvvjYDHA.65 6@tk2msftngp13. phx.gbl>
        | Newsgroups: microsoft.publi c.dotnet.framew ork.aspnet
        | NNTP-Posting-Host: 207-237-240-45.c3-0.nyw-ubr2.nyr-nyw.ny.cable.rc n.com
        207.237.240.45
        | Path: cpmsftngxa06.ph x.gbl!TK2MSFTNG P08.phx.gbl!tk2 msftngp13.phx.g bl
        | Xref: cpmsftngxa06.ph x.gbl microsoft.publi c.dotnet.framew ork.aspnet:1677 71
        | X-Tomcat-NG: microsoft.publi c.dotnet.framew ork.aspnet
        |
        | aj,
        |
        | Thanks very much for your detailed reply.
        |
        | I've had so many people tell me progress bars for backend SQL queries
        | couldn't be done in web forms.
        |
        | Both your generous recommendation and the other extensive responses here
        | regarding multithreading convince me that there's always a way o do
        | something.
        |
        | Regards,
        |
        | Alan
        |
        |
        | "aj" <jathanamit@yah oo.com> wrote in message
        | news:0baa01c361 c1$bb15b410$a00 1280a@phx.gbl.. .
        | > Alan, you can achieve this by using XMLHttp Async
        | > functionality in a javascript file.
        | >
        | > Create an aspx page in which execute long running SQL
        | > query, then do an XMLhttp post to that page from a js
        | > function.
        | >
        | >
        | > In the javascript create 2 funtion
        | > Call LoadData in the window onload event.
        | >
        | > var objXMLReq;
        | > function LoadData() {
        | > objXMLReq = new ActiveXObject
        | > ("Microsoft.XML Http");
        | > var DataUrl = 'http://localhost/Query.aspx';
        | >
        | > objXMLReq.onrea dystatechange =
        | > ManageASyncXMLH TTPOperation;
        | > objXMLReq.open( "POST", DataUrl, true);
        | > objXMLReq.setRe questHeader('Co ntent-
        | > type', 'text/xml');
        | > objXMLReq.send( );
        | >
        | > //Display Progress bar("Retrieving data...");
        | > }
        | >
        | > function ManageASyncXMLH TTPOperationDTL () {
        | > switch (objXMLReq.read yState) {
        | >
        | > case 2, 3:
        | > break;
        | >
        | > case 4:
        | > //Hide the progress bar
        | > //Display the data
        | > div.innherText= objXMLReq.respo nseText;
        | > }
        | > }
        | >
        | > >-----Original Message-----
        | > >Does anyone know of web form Progress Bar controls or
        | > simulations for
        | > > long-running SQLServer process?
        | > >
        | > > Is it possible to use a conceptual method such as
        | > >
        | > > 1. Have SQLServer post status updates or number of
        | > seconds elapsed to
        | > > database table, and
        | > >
        | > > 2. Have web form post commands to retrieve data from
        | > the table based
        | > >on a timer, but inhibit web form redrawing until
        | > SQLServer table progress
        | > >numbers
        | > >pass certain threshholds?
        | > >
        | > > Thanks.
        | > >
        | > > Alan
        | > >______________ _____________
        | > >Alan Z. Scharf
        | > >GrapeVine Systems
        | > >New York City
        | > >
        | > >
        | > >.
        | > >
        |
        |
        |

        Comment

        • Alan Z. Scharf

          #5
          Re: Web Form Progress Bar

          oj,

          Thanks very much for the help and code. I will give it a try.

          Regards,

          Alan

          "aj" <jathanamit@yah oo.com> wrote in message
          news:0baa01c361 c1$bb15b410$a00 1280a@phx.gbl.. .[color=blue]
          > Alan, you can achieve this by using XMLHttp Async
          > functionality in a javascript file.
          >
          > Create an aspx page in which execute long running SQL
          > query, then do an XMLhttp post to that page from a js
          > function.
          >
          >
          > In the javascript create 2 funtion
          > Call LoadData in the window onload event.
          >
          > var objXMLReq;
          > function LoadData() {
          > objXMLReq = new ActiveXObject
          > ("Microsoft.XML Http");
          > var DataUrl = 'http://localhost/Query.aspx';
          >
          > objXMLReq.onrea dystatechange =
          > ManageASyncXMLH TTPOperation;
          > objXMLReq.open( "POST", DataUrl, true);
          > objXMLReq.setRe questHeader('Co ntent-
          > type', 'text/xml');
          > objXMLReq.send( );
          >
          > //Display Progress bar("Retrieving data...");
          > }
          >
          > function ManageASyncXMLH TTPOperationDTL () {
          > switch (objXMLReq.read yState) {
          >
          > case 2, 3:
          > break;
          >
          > case 4:
          > //Hide the progress bar
          > //Display the data
          > div.innherText= objXMLReq.respo nseText;
          > }
          > }
          >[color=green]
          > >-----Original Message-----
          > >Does anyone know of web form Progress Bar controls or[/color]
          > simulations for[color=green]
          > > long-running SQLServer process?
          > >
          > > Is it possible to use a conceptual method such as
          > >
          > > 1. Have SQLServer post status updates or number of[/color]
          > seconds elapsed to[color=green]
          > > database table, and
          > >
          > > 2. Have web form post commands to retrieve data from[/color]
          > the table based[color=green]
          > >on a timer, but inhibit web form redrawing until[/color]
          > SQLServer table progress[color=green]
          > >numbers
          > >pass certain threshholds?
          > >
          > > Thanks.
          > >
          > > Alan
          > >______________ _____________
          > >Alan Z. Scharf
          > >GrapeVine Systems
          > >New York City
          > >
          > >
          > >.
          > >[/color][/color]


          Comment

          Working...