1. #1
    Sencha User
    Join Date
    Mar 2010
    Posts
    482
    Answers
    12
    Vote Rating
    0
    abcdef is an unknown quantity at this point

      0  

    Default Answered: How to have the response to any ajax request check for a custom message?

    Answered: How to have the response to any ajax request check for a custom message?


    I want to check for a certain type of custom message that I need to check for, before handling any ajax response (either via store's proxy, or an Ext.Ajax.request call). Is there a way I can do it centrally first, and then carry on with usual logic of the store or the 'success' method of an Ext.Ajax.request call?

  2. I think you can register a listener to Ext.Ajax#requestcomplete. If I am not mistaken, this should fire for every request made using the Ext.Ajax (singleton) class. That includes, for instance, Ext.data.proxy.Ajax.

  3. #2
    Sencha User mberrie's Avatar
    Join Date
    Feb 2011
    Location
    Bangkok, Thailand
    Posts
    506
    Answers
    26
    Vote Rating
    14
    mberrie will become famous soon enough mberrie will become famous soon enough

      0  

    Default


    I think you can register a listener to Ext.Ajax#requestcomplete. If I am not mistaken, this should fire for every request made using the Ext.Ajax (singleton) class. That includes, for instance, Ext.data.proxy.Ajax.

  4. #3
    Sencha User
    Join Date
    Mar 2010
    Posts
    482
    Answers
    12
    Vote Rating
    0
    abcdef is an unknown quantity at this point

      0  

    Default


    Quote Originally Posted by mberrie View Post
    I think you can register a listener to Ext.Ajax#requestcomplete. If I am not mistaken, this should fire for every request made using the Ext.Ajax (singleton) class. That includes, for instance, Ext.data.proxy.Ajax.
    Perfect. Thanks!

Thread Participants: 1