Results 1 to 2 of 2

Thread: Can't get the server side response after an Ext.Direct call

  1. #1
    Sencha User
    Join Date
    Jun 2011
    Vote Rating

    Default Can't get the server side response after an Ext.Direct call

    Hey everyone !

    As you see my question, I'm totally new with extjs (and also with Javascript). I'm trying to make a little MVC app, with a PHP server side, using Ext.Direct.

    I already find how get the answer (callback) with a formpanel and it "submit" method.
    But now I try to call and receive data, after an button click.

    Now I want :
    Ask data to my server side, and catch the response after I press a button. But I dont' understand how to catch the server response !

    There is my code :

    Ext.define('client_app.controller.Header', {
         extend: ''
        ,views: [ 'Header']
        ,init: function() {
               // I add an observer on a button of my view. So when I' click on it,
               // "testevent" is called.        
           'header_menu button[action=dspManageMandate]' :{
               click: this.testevent}
        testevent: function(buton, event) {
            // I call php method getFrom, in a PHP Form object. the '1' is a parameter 
            // I can see the JSON answer in my browser console, so the server side works
  '1', function(response, e) {
                           // Problem !!! my app never come there. So How can I catch the server
                            // response ??
                            alert('Callback OK. Fn succes :'+ e.statut);
                        } );
    If some understand why my app never go in my last function, or can explain me how catch the response or any suggestion I will really appreciate.

    I'm on it since 3 days, and I really don't know what to do...

    (I also post in the Ext.Direct part because I don't know if it's an Ext.Direct problem, or if that's because I don't understand extjs callback function. I will delete 1 of these 2 post when I'll understand my problem)
    (Sorry for my bad english )

  2. #2
    Sencha User
    Join Date
    Mar 2012
    Vote Rating

    Default Same here

    Same problem here...please someone help

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts