having a loading image..

hi…



i was wondering if there’s a way of having an image covering the grid while loading…

i have this button that whenever clicked it reloads the grid with a different xml…without reloading the page…

my questin is, is there a way of having an image cover the grid while the xml is being loaded and then disappears when loading finishes…

i know already about the events…its just that i don’t know how to cover the grid with the image…



and also is it possible to trigger an a function with two or more events…?

i have several grids in the page…so i was hoping to trigger a function when all of them have already loaded (through loadXML())



thanks once again…

>>i was wondering if there’s a way of having an image covering the grid while loading…

Please check attached sample it show very similar use case implementation


>>and also is it possible to trigger an a function with two or more events…?

You can use event handler for any count of functions

function loading_end(){

    this.doSomeThing ( …   //   this point to grid instance

}

grid1.attachEvent(“onXLE”,loading_end);
grid2.attachEvent(“onXLE”,loading_end);



1192787109.ZIP (63.7 KB)


hi…



>>and also is it possible to trigger an a function with two or more events…?

You can use event handler for any count of functions

function loading_end(){
    this.doSomeThing ( …   //   this point to grid instance
}

grid1.attachEvent(“onXLE”,loading_end);
grid2.attachEvent(“onXLE”,loading_end);




-> actually what i meant was an event AND another event…rather than OR…i think what you gave me was an OR…i was hoping to trigger the function when both two events have happened…if the event that happened was just one the events…then the function wont be executed…



thank you again.



 

-> actually what i meant was an
event AND another event…rather than OR…i think what you gave me was
an OR…i was hoping to trigger the function when both two events have
happened…if the event that happened was just one the events…then the
function wont be executed…

There is no way to attach it “as AND” but next logic will cause similar effect

var load_count=0;
function loading_end(){
    load_count++;
    if (load_count!=2) return;

    this.doSomeThing ( …   //   this point to grid instance

    load_count=0;
}

grid1.attachEvent(“onXLE”,loading_end);
grid2.attachEvent(“onXLE”,loading_end);