1. #1
    Ext User
    Join Date
    Oct 2008
    Posts
    12
    Vote Rating
    0
    Eisert is on a distinguished road

      0  

    Default Auto refresing multiple DIV

    Auto refresing multiple DIV


    Hello,

    I am new to the EXT JS framework and have an issue I am hoping that someone out there can assist me with.

    What I am trying to do is load and then auto update two div tags on a web page.

    I have this working using the Ext.util.TaskRunner, however, when it does the refresh it removes the information on the screen, shows the updating text and then will refresh the div with the updated content.

    Is there a way to make the update silent so that it does not blank the div, show the updating text, and then update the div content?

    I have this working using adobe spry but would like to move away from spry.

    Code:
    
    
    Ext.onReady(function(){
                         
    var msg = Ext.get('msg');
            msg.load({
                url: 'test.php' // <-- change if necessary
                //params: 'name=' + Ext.get('name').dom.value,
                
            });
            msg.show();
            
            var msg = Ext.get('msg2');
            msg.load({
                url: 'test2.php' // <-- change if necessary
                //params: 'name=' + Ext.get('name').dom.value,
                
            });
            msg.show();
    
    
    
    
    var task = {
        run: function(){
        var msg = Ext.get('msg');
         msg.load({
                url: 'test.php' // <-- change if necessary
                //params: 'name=' + Ext.get('name').dom.value,
                
            });
            msg.show();
        var msg = Ext.get('msg2');
            msg.load({
                url: 'test2.php' // <-- change if necessary
                //params: 'name=' + Ext.get('name').dom.value,
                
            });
            msg.show();
        },
        interval: 10000 //1 second
    }
    var runner = new Ext.util.TaskRunner();
    runner.start(task);
    
    
        
    });

  2. #2
    Sencha - Community Support Team jay@moduscreate.com's Avatar
    Join Date
    Mar 2007
    Location
    Frederick MD, NYC, DC
    Posts
    16,169
    Vote Rating
    28
    jay@moduscreate.com is a jewel in the rough jay@moduscreate.com is a jewel in the rough jay@moduscreate.com is a jewel in the rough jay@moduscreate.com is a jewel in the rough

      0  

    Default


    pass showLoadIndicator : false to the load arguments.

    Jay Garcia @ModusJesus || Modus Create co-founder
    Ext JS in Action author
    Sencha Touch in Action author

    Get in touch for Ext JS & Sencha Touch Touch Training

    We are also working on Video-based Sencha Touch training: Check it out here.

  3. #3
    Ext User
    Join Date
    Oct 2008
    Posts
    12
    Vote Rating
    0
    Eisert is on a distinguished road

      0  

    Default


    Excellent,

    Thank you very much that did it!