Render delay

  1. #1

    Render delay

    Hi guys, congratulations for the great work.

    I've been having this issue for a long time, probably I'm missing something...

    There is a delay to show the ext objects (generated by coolite) in the page when it loads. When the page loasds the content of all Coolite containers appears rendered but disordered.. after a couple of seconds (more than a couple i fyou have a lot of coolite controls) the ext objects appear and everything looks fine..

    There is any way to improve this behavior? Options will be, to make ext objects render before or to hide contents until everithing gets rendered...

    Any ideas?

    Cheers,
  2. #2

    RE: Render delay

    *Hi Oscar,

    I can suggest next solution:

    <%@ Page Language="C#" AutoEventWireup="true" CodeBehind="Default.aspx.cs" Inherits="Coolite.Sandbox.Temp.LoadingMask.Default" %>
    
    <%@ Register Assembly="Coolite.Ext.Web" Namespace="Coolite.Ext.Web" TagPrefix="ext" %>
    
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
    
    <html xmlns="http://www.w3.org/1999/xhtml" >
    <head runat="server">
    *** <title>Loading mask</title>
    *** <style type="text/css">
    ******* #loading-mask{
    *** ******* position:absolute;
    *** ******* left:0;
    *** ******* top:0;
    *********** width:100%;
    *********** height:100%;
    *********** z-index:20000;
    *********** background-color:white;
    ******* }
    ******* #loading{
    *** ******* position:absolute;
    *** ******* left:45%;
    *** ******* top:40%;
    *** ******* padding:2px;
    *** ******* z-index:20001;
    *********** height:auto;
    ******* }
    ******* #loading img {
    *********** margin-bottom:5px;
    ******* }
    ******* #loading .loading-indicator{
    *** ******* background:white;
    *** ******* color:#555;
    *** ******* font:bold 13px tahoma,arial,helvetica;
    *** ******* padding:10px;
    *** ******* margin:0;
    *********** text-align:center;
    *********** height:auto;
    ******* }
    *** </style>
    </head>
    <body>
    *** <form id="form1" runat="server">
    ******* <div id="loading-mask" style="">
    
    ******* <div id="loading">
    ********** <div class="loading-indicator"><img src="extanim32.gif" width="32" height="32" style="margin-right:8px;" align="absmiddle"/>Loading, please wait...
    
    ******* 
    
    ******* <ext:ScriptManager ID="ScriptManager1" runat="server">
    *********** <Listeners>
    *************** <DocumentReady Handler="setTimeout(function(){Ext.get('loading').remove();Ext.get('loading-mask').fadeOut({remove:true});}, 250);" />
    *********** </Listeners>
    ******* </ext:ScriptManager>
    ******* <ext:ScriptContainer ID="ScriptContainer1" runat="server">
    ******* </ext:ScriptContainer>
    ******* 
    ******* Page loading have finished
    *** </form>
    </body>
    </html>
    Please notice that the loading mask/indicator divs must be place above Coolite include scripts. For this I placed ScriptContainer after mask/indicator divs

    Let me know if this example is not works for you or i wrong understood your requirements
  3. #3

    RE: Render delay

    Thanks Vladimir, worked like a charm!

    Cheers,
  4. #4

    RE: Render delay

    Hi
    How would you suggest disabling/removing the DocumentReady Listener after a page has first loaded so that the "loading ..." mask does not show on subsequent postbacks?
  5. #5

    RE: Render delay

    *Hi,

    Just set empty handler on postback


    if(this.IsPostBack)
    {
    ** * *ScriptManager1.Listeners.DocumentReady.Handler = "";
    }




  6. #6

    RE: Render delay

    vladimir (3/2/2009)
    Just set empty handler on postback
    Thanks :)

    I am trying all sorts of things atm including stuff I find the these forums

    Setting the documentready.handler had some undesired sideeffects in my case - resetting the handler by applying an empty string solved my issue with alert messages getting delayed during ajaxevents ...

    - Peter

Similar Threads

  1. mask delay
    By norphos in forum 1.x Help
    Replies: 3
    Last Post: Jul 21, 2011, 7:25 AM
  2. [CLOSED] Toggle Render? Refresh Render?
    By rthiney in forum 1.x Legacy Premium Help
    Replies: 2
    Last Post: Jul 08, 2011, 3:13 PM
  3. [CLOSED] MessageBox with Delay
    By macap in forum 1.x Legacy Premium Help
    Replies: 3
    Last Post: Jul 30, 2010, 5:03 PM
  4. Add delay into javascript
    By flaviodamaia in forum 1.x Help
    Replies: 1
    Last Post: Sep 30, 2009, 9:17 AM
  5. Buffer/delay after save?
    By Tbaseflug in forum 1.x Help
    Replies: 0
    Last Post: Feb 25, 2009, 6:42 PM

Posting Permissions