views:

646

answers:

1

I am using a JSONStore in ExtJS and loading data by using setting the URL config and then calling the load method, is there anyway i can unmask the form only once the data is loaded. At the moment it unmasks after the load method which doesn't work since the load is async. But what i want to do is only unmask after the async operation has completed. Any Suggestions welcome.

+1  A: 

Insert your code to hide the mask in the callback of the load function.

store.load({
params: { your params },
callback: function(r, options, success) {
 // Checks to make sure the response was returned
 if(success == true) {
  // Logic to ensure valid data returned
  if (r.status == true) {     
   mask.hide();
  }

  else {
   ...
  }
 }

 else {
  ...
 }
}

});

Jason