Results 1 to 5 of 5

Thread: UpdateManager wait icon

  1. #1

    Default UpdateManager wait icon

    Hi,
    There's some thing unusual happening when i use updatemanager..
    I have two divs in my page and load some content dynamically from a server call
    every thing works fine except that one div shows "loading" with icon at place and other just shows "loading" with no icon at place..

    why is this happening?

  2. #2
    Sencha User jack.slocum's Avatar
    Join Date
    Mar 2007
    Location
    New York, NY
    Posts
    6,956

    Default

    I don't know. Do you use the standard .loading-indicator selector? If yes, do you have it in an element with any rules that would override the CSS for the indicator?

  3. #3

    Default

    here is the whole code
    Code:
    <head>
        <title>Loading Indicaator Example</title>
        <style>
            .loading-indicator {
    	        font-size:8pt;
    	        background-image: url('images/wait.gif');
    	        background-repeat: no-repeat;
    	        background-position: left;
    	        padding-left:20px;
            }    
            #example {
    	        border-right: black 1px solid;
    	        border-top: black 1px solid;
    	        border-left: black 1px solid;
    	        border-bottom: black 1px solid;
    	        background-color: #ffccff;
    	        height:500px;
    	        width:24%;        
    	        padding:5px;    
    	        float:left;
    	        clear:right;
            }
            #example1 {
    	        border-right: black 1px solid;
    	        border-top: black 1px solid;
    	        border-left: black 1px solid;
    	        border-bottom: black 1px solid;
    	        height:500px;
    	        width:74%;
    	        padding:5px;          
    	        float:right;
    	        clear:left;
            }
            
        </style>
        <script></script> //yahoo's all utilities
        <script></script>
        <script></script>
        <script></script>
        <script></script>
        <script></script>
        
        <script></script> //yui-ext-core.js
    
        <script>
            var ajaxExample = {
                ajaxInit : function(){
                    var mgr = new YAHOO.ext.UpdateManager('example');//pass the element id here
                    mgr.update('LoadingHandler.ashx');//server script to call
                    mgr.onUpdate.subscribe(this.onCallSuccess);//callback for success
                    mgr.onFailure.subscribe(this.onCallFailure);//callback for failure
                    
                    var mgr1 = new YAHOO.ext.UpdateManager('example1',true);
                    mgr1.update('LoadHandler.ashx');
                    mgr1.onUpdate.subscribe(this.onSuccess);
                    mgr1.onFailure.subscribe(this.onFailure);
    
                },
                onCallSuccess : function(oElement,oResponse){
                    example.innerHTML = oResponse.responseText;
                    
                },
                onCallFailure: function(oElement,oResponse){
                    alert("failure - example div");
                },
                onSuccess : function(oElement,oResponse){
                    example1.innerHTML = oResponse.responseText;
                },
                onFailure: function(oElement,oResponse){
                    alert("failure - example1 div");
                }
            };
            //could have registered using simple js window events here
            YAHOO.ext.EventManager.onDocumentReady(ajaxExample.ajaxInit, ajaxExample, true);
            
        </script>
    </head>
    <body>
        <form>
        <div> </div>
        <div> </div>
        </form>
    </body>
    </html>

  4. #4
    Sencha User jack.slocum's Avatar
    Join Date
    Mar 2007
    Location
    New York, NY
    Posts
    6,956

    Default

    I don't know. There's not much that can go wrong there. I don't know what to suggest.

    You can lose the onUpdate handlers, it will do that for you.
    You will want to subscribe to onFailure before you call update in case it returns immediately.

  5. #5

    Default

    i did all that, the error still remains..
    does this error happen at your end with the same example?

Similar Threads

  1. Hiding the Menu Icon
    By jon.whitcraft in forum Ext 2.x: Help & Discussion
    Replies: 7
    Last Post: 21 May 2011, 5:47 PM
  2. add a Wait Gif to GRID
    By willianeiro in forum Ext 1.x: Help & Discussion
    Replies: 2
    Last Post: 10 Sep 2008, 7:46 PM
  3. Treepanel and folder icon
    By alex1er in forum Ext 2.x: Help & Discussion
    Replies: 4
    Last Post: 2 Mar 2007, 8:09 AM
  4. Minor css bug date icon
    By glauff in forum Ext 2.x: Help & Discussion
    Replies: 1
    Last Post: 22 Feb 2007, 4:25 PM
  5. Add a wait gif to a tab label
    By dmayer in forum Ext 1.x: Help & Discussion
    Replies: 1
    Last Post: 20 Nov 2006, 1:42 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •