Belbarrin
Belbarrin

Reputation: 45

Ext.img and 404 not found

Just a simple question but i search that since some hours : How catch 404 not found with Ext.img ?

I didn't find error event or something like that in docs, try some code but nothing work...

Have a nice day,

Thx.

Upvotes: 1

Views: 617

Answers (1)

Varun Achar
Varun Achar

Reputation: 15109

I haven't ever tried this but Ext.Img has a loader config which accepts a Ext.ComponentLoader, so you could try this:

Ext.create('Ext.Img',{
  //other config,
  loader : {
   url : 'src.jpeg',
   autoLoad : true,
   callback : function(img, success, response, opts)
   {
      if(!success)
      {
           //do whatever
      }
   }
  }
});

Upvotes: 2

Related Questions