ajax progress does not display during intial page load use javascr

Discussion in 'ASP .Net' started by cindy, Jul 8, 2009.

  1. cindy

    cindy Guest

    I am using Ajax panels to show progress when a button inside an update panel
    executes a procedure “Chart2_Load†to fill a chart also inside an update
    panel. It works the progress panel behaves correctly.

    When the page loads initially the chart is filled with a default values and
    the progress bar does not show during the initial page load, this is also the
    longest time to wait for the load.

    protected void Page_Load(object sender, EventArgs e)
    {
    if (!(Page.IsPostBack))
    {
    Chart2_Load(TextStart, TextEnd);

    }
    }

    How can I show simple waiting message with Javascript or tell me what I am
    doing wrong with Ajax to get the progress panel to display during the first
    page load seen above? Progress panel is NOT associated with a specific
    update panel.

    I have included the html for the panels below.
    User requirements are to load the page initial with default values and not
    ask them to click before chart loads first time.


    <html xmlns="http://www.w3.org/1999/xhtml" >
    <head runat="server">
    <style type="text/css">……..
    </style>
    </head>
    <body>
    <form id="form1" runat="server">
    <asp:ScriptManager ID="ScriptManager1" runat="server" />
    <asp:UpdatePanel ID="QuarterUpdatePanel" runat="server"
    ChildrenAsTriggers="true" UpdateMode="Always">
    <ContentTemplate>
    <asp:DataList id="dlButtons runat="server" />
    </ContentTemplate>
    </asp:UpdatePanel>
    <asp:UpdatePanel ID="PieUpdatePanel" runat="server"
    OnLoad="PieUpdatePanel_Load" ChildrenAsTriggers="true" UpdateMode="Always">
    <ContentTemplate>
    <dotnet:Chart id="ChartPie" runat="server"/>
    </ContentTemplate>
    </asp:UpdatePanel>
    <asp:UpdateProgress ID="UpdateProgress1" runat="server"
    ChildrenAsTriggers="true" UpdateMode="Always">
    <ProgressTemplate>
    <div id="OuterTableCellOverlay">
    <div id="InnerTableCellOverlay">
    <b>... LOADING ...</b>
    <asp:Image ID="LoadImage" runat="server"
    ImageUrl="~/Images/ajax-loader.gif" />
    </div>
    </div>
    </ProgressTemplate>
    </asp:UpdateProgress>
    <asp:UpdatePanel ID="ChartUpdatePanel" runat="server"
    OnLoad="ChartUpdatePanel_Load">
    <ContentTemplate>
    <dotnet:Chart id="Chart5" runat="server"/>
    </ContentTemplate>
    </asp:UpdatePanel>
    </form>
    </body>
    </html>


    --
    cindy
     
    cindy, Jul 8, 2009
    #1
    1. Advertising

  2. cindy

    dotNetDave Guest

    The UpdateProgress is for async calls to let the user know something is going
    on since the browser will not. The first page load is not this type of call
    and the browser is showing progress.

    Not sure you really need this.

    David


    ======================================
    David McCarter [Microsoft MVP]
    www.dotNetTips.com
    David McCarter''s .NET Coding Standards available at:
    http://codingstandards.notlong.com


    "cindy" wrote:

    > I am using Ajax panels to show progress when a button inside an update panel
    > executes a procedure “Chart2_Load†to fill a chart also inside an update
    > panel. It works the progress panel behaves correctly.
    >
    > When the page loads initially the chart is filled with a default values and
    > the progress bar does not show during the initial page load, this is also the
    > longest time to wait for the load.
    >
    > protected void Page_Load(object sender, EventArgs e)
    > {
    > if (!(Page.IsPostBack))
    > {
    > Chart2_Load(TextStart, TextEnd);
    >
    > }
    > }
    >
    > How can I show simple waiting message with Javascript or tell me what I am
    > doing wrong with Ajax to get the progress panel to display during the first
    > page load seen above? Progress panel is NOT associated with a specific
    > update panel.
    >
    > I have included the html for the panels below.
    > User requirements are to load the page initial with default values and not
    > ask them to click before chart loads first time.
    >
    >
    > <html xmlns="http://www.w3.org/1999/xhtml" >
    > <head runat="server">
    > <style type="text/css">……..
    > </style>
    > </head>
    > <body>
    > <form id="form1" runat="server">
    > <asp:ScriptManager ID="ScriptManager1" runat="server" />
    > <asp:UpdatePanel ID="QuarterUpdatePanel" runat="server"
    > ChildrenAsTriggers="true" UpdateMode="Always">
    > <ContentTemplate>
    > <asp:DataList id="dlButtons runat="server" />
    > </ContentTemplate>
    > </asp:UpdatePanel>
    > <asp:UpdatePanel ID="PieUpdatePanel" runat="server"
    > OnLoad="PieUpdatePanel_Load" ChildrenAsTriggers="true" UpdateMode="Always">
    > <ContentTemplate>
    > <dotnet:Chart id="ChartPie" runat="server"/>
    > </ContentTemplate>
    > </asp:UpdatePanel>
    > <asp:UpdateProgress ID="UpdateProgress1" runat="server"
    > ChildrenAsTriggers="true" UpdateMode="Always">
    > <ProgressTemplate>
    > <div id="OuterTableCellOverlay">
    > <div id="InnerTableCellOverlay">
    > <b>... LOADING ...</b>
    > <asp:Image ID="LoadImage" runat="server"
    > ImageUrl="~/Images/ajax-loader.gif" />
    > </div>
    > </div>
    > </ProgressTemplate>
    > </asp:UpdateProgress>
    > <asp:UpdatePanel ID="ChartUpdatePanel" runat="server"
    > OnLoad="ChartUpdatePanel_Load">
    > <ContentTemplate>
    > <dotnet:Chart id="Chart5" runat="server"/>
    > </ContentTemplate>
    > </asp:UpdatePanel>
    > </form>
    > </body>
    > </html>
    >
    >
    > --
    > cindy
     
    dotNetDave, Jul 15, 2009
    #2
    1. Advertising

  3. cindy

    cindy Guest

    RE: ajax progress does not display during intial page load use jav

    Correct I see AJAX is not for this
    It is still required on the first load of the message to display "waiting"
    message and I cannot get any javascript to work I do not know if it is
    because there is AJAX on page or if it is because I am too bad at script that
    I am getting all the online examples wrong
    Do I put the script in wrong place

    CAN anyone point me to a script to say "Waiting"
    tell me where to put it on the page
    do I put it in script tag in head, not in head, after body, in code behind
    as a register script, do I put body=onload etc what is syntax to get the
    message started as the page loads and gone when it finishes loading

    The page on intial load executes a procedure using default values to
    populate a grid after that I use buttons Using AJAX I can get the buttons to
    fill the grid and show the progress bar

    Do a search on cindy either in scripting or ASP.net and you can see that
    this question is a month old I got the ajax solution for the progress of
    server side procedure on a click but no one can show how to display waiting
    on load
    --
    cindy


    "dotNetDave" wrote:

    > The UpdateProgress is for async calls to let the user know something is going
    > on since the browser will not. The first page load is not this type of call
    > and the browser is showing progress.
    >
    > Not sure you really need this.
    >
    > David
    >
    >
    > ======================================
    > David McCarter [Microsoft MVP]
    > www.dotNetTips.com
    > David McCarter''s .NET Coding Standards available at:
    > http://codingstandards.notlong.com
    >
    >
    > "cindy" wrote:
    >
    > > I am using Ajax panels to show progress when a button inside an update panel
    > > executes a procedure “Chart2_Load†to fill a chart also inside an update
    > > panel. It works the progress panel behaves correctly.
    > >
    > > When the page loads initially the chart is filled with a default values and
    > > the progress bar does not show during the initial page load, this is also the
    > > longest time to wait for the load.
    > >
    > > protected void Page_Load(object sender, EventArgs e)
    > > {
    > > if (!(Page.IsPostBack))
    > > {
    > > Chart2_Load(TextStart, TextEnd);
    > >
    > > }
    > > }
    > >
    > > How can I show simple waiting message with Javascript or tell me what I am
    > > doing wrong with Ajax to get the progress panel to display during the first
    > > page load seen above? Progress panel is NOT associated with a specific
    > > update panel.
    > >
    > > I have included the html for the panels below.
    > > User requirements are to load the page initial with default values and not
    > > ask them to click before chart loads first time.
    > >
    > >
    > > <html xmlns="http://www.w3.org/1999/xhtml" >
    > > <head runat="server">
    > > <style type="text/css">……..
    > > </style>
    > > </head>
    > > <body>
    > > <form id="form1" runat="server">
    > > <asp:ScriptManager ID="ScriptManager1" runat="server" />
    > > <asp:UpdatePanel ID="QuarterUpdatePanel" runat="server"
    > > ChildrenAsTriggers="true" UpdateMode="Always">
    > > <ContentTemplate>
    > > <asp:DataList id="dlButtons runat="server" />
    > > </ContentTemplate>
    > > </asp:UpdatePanel>
    > > <asp:UpdatePanel ID="PieUpdatePanel" runat="server"
    > > OnLoad="PieUpdatePanel_Load" ChildrenAsTriggers="true" UpdateMode="Always">
    > > <ContentTemplate>
    > > <dotnet:Chart id="ChartPie" runat="server"/>
    > > </ContentTemplate>
    > > </asp:UpdatePanel>
    > > <asp:UpdateProgress ID="UpdateProgress1" runat="server"
    > > ChildrenAsTriggers="true" UpdateMode="Always">
    > > <ProgressTemplate>
    > > <div id="OuterTableCellOverlay">
    > > <div id="InnerTableCellOverlay">
    > > <b>... LOADING ...</b>
    > > <asp:Image ID="LoadImage" runat="server"
    > > ImageUrl="~/Images/ajax-loader.gif" />
    > > </div>
    > > </div>
    > > </ProgressTemplate>
    > > </asp:UpdateProgress>
    > > <asp:UpdatePanel ID="ChartUpdatePanel" runat="server"
    > > OnLoad="ChartUpdatePanel_Load">
    > > <ContentTemplate>
    > > <dotnet:Chart id="Chart5" runat="server"/>
    > > </ContentTemplate>
    > > </asp:UpdatePanel>
    > > </form>
    > > </body>
    > > </html>
    > >
    > >
    > > --
    > > cindy
     
    cindy, Jul 16, 2009
    #3
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Replies:
    2
    Views:
    1,965
    Brian Williams
    Jan 15, 2007
  2. catalyst
    Replies:
    5
    Views:
    561
    Jukka K. Korpela
    Jun 24, 2008
  3. cindy
    Replies:
    6
    Views:
    1,953
    big_M
    Nov 19, 2009
  4. Mike Dee
    Replies:
    3
    Views:
    320
    Mamidipalli
    Mar 1, 2006
  5. venkat reddy
    Replies:
    1
    Views:
    301
    Elegie
    Jul 8, 2011
Loading...

Share This Page