Hybrid View

  1. #1
    Sencha User
    Join Date
    Mar 2008
    Posts
    53
    Vote Rating
    2
    manilodisan is on a distinguished road

      0  

    Default Ext air application error in submitting form

    Ext air application error in submitting form


    I have a basic form which submits a post request to a localhost server. When I hit submit I get this error log in Aptana:

    Code:
    Error: Adobe AIR runtime security violation for JavaScript code in the application security sandbox (eval)
     at app:/media/javascript/extjs/ext-all-debug.js : 4233
     at app:/media/javascript/extjs/ext-all-debug.js : 4352
     at app:/media/javascript/extjs/ext-all-debug.js : 44962
     at app:/media/javascript/extjs/ext-all-debug.js : 44827
     at app:/media/javascript/extjs/ext-all-debug.js : 44931
     at app:/media/javascript/extjs/ext-all-debug.js : 4061
    handleTransactionResponse at app:/media/javascript/extjs/adapter/ext/ext-base-debug.js : 1864
    checkResponse at app:/media/javascript/extjs/adapter/ext/ext-base-debug.js : 1912
     at app:/media/javascript/extjs/adapter/ext/ext-base-debug.js : 902
    undefined at undefined : undefined
    Any idea what I'm doing wrong? Here's my code:

    Code:
    buttons: [{
            text: 'Login',
            handler: function(el) {
                    form.getForm().submit({
                            url: AP_ROOT_URL + '/index.php?r=site/login',
                            method: 'post',
                            success: function(form, action) {
                                   alert('something');
                            },
                            failure: function(form, action) {
                                    switch (action.failureType) {
                                            case Ext.form.Action.CLIENT_INVALID:
                                                    Ext.Msg.alert('Failure', 'Please complete all required fields');
                                                    break;
                                            case Ext.form.Action.CONNECT_FAILURE:
                                                    Ext.Msg.alert('Failure', 'Ajax communication failed');
                                                    break;
                                            case Ext.form.Action.SERVER_INVALID:
                                            //Ext.Msg.alert('Failure', action.result.msg);
                                    }
                            }
                    });
            }
    }]

  2. #2
    Sencha - Community Support Team Condor's Avatar
    Join Date
    Mar 2007
    Location
    The Netherlands
    Posts
    24,246
    Vote Rating
    96
    Condor has much to be proud of Condor has much to be proud of Condor has much to be proud of Condor has much to be proud of Condor has much to be proud of Condor has much to be proud of Condor has much to be proud of Condor has much to be proud of

      0  

    Default


    I don't work with AIR, but I do know that using eval() (which is used by Ext.decode during server response evaluation) is not allowed.

    I haven't tested, but I assume that using JSON.parse() is still allowed. Try setting:
    Code:
    Ext.USE_NATIVE_JSON = true;

Similar Threads

  1. Error on submitting form (Syntax error () line 7389)
    By bisounux in forum Ext 2.x: Help & Discussion
    Replies: 2
    Last Post: 20 Aug 2009, 2:12 PM
  2. Replies: 2
    Last Post: 26 Nov 2008, 12:30 PM
  3. ext-all-debug error by submitting a form
    By sheddy in forum Ext 2.x: Help & Discussion
    Replies: 7
    Last Post: 16 Sep 2008, 11:35 PM

Thread Participants: 1