Threaded View

  1. #1
    Sencha User
    Join Date
    Oct 2012
    Posts
    19
    Vote Rating
    1
    honggang.z.zhu is on a distinguished road

      0  

    Default can not call the web service when form is submited

    can not call the web service when form is submited


    I made a form panel, when I click save button, I want to call the web service to add data.
    I published the web site and web service on my computer, On my own computer the form is submitted successfully, but on another computer, the form is submitted failure, alert message 'Ajax communication failed'.
    case Ext.form.action.Action.CONNECT_FAILURE:
    Ext.Msg.alert('Failure', 'Ajax communication failed');

    Untitled.png


    If I do not use form submit, I use the store.load to call a web service, it can works well when I access the web site on another computer. I don't know why, please help me. thanks.

    blow is the code:
    Code:
    var me = this;
    var _webServiceUrl = 'http://10.40.33.195/MRCReceivingWS/Bas/Area.asmx/Add';
    
    
    var _userId = Ext.getCmp('lblGID').text;
    
    
    var form = button.up('form').getForm();
    form.submit({
        url: _webServiceUrl,
        method: 'POST', 
        params: {
            userId: _userId
        },
        success: function(form, action) {        
            switch(app.AppConfig.g_pagEditFlag){
                case 1:                
                Ext.Msg.alert('Success', action.result.msg, function(){                
                    button.up('form').getForm().reset();
                    app.controller.CommonLogic.elmentGetFocus('txtAreaName', false);
                    me.queryData();
                });
                break;
                case 2:
                Ext.Msg.alert('Success', action.result.msg, function(){
                    me.getPageBasAreaEdit().close();                
                    me.queryData();
                });                
                break;
            }
    
    
    
    
        },
        failure: function(form, action) {
            switch (action.failureType) {
                case Ext.form.action.Action.CLIENT_INVALID:
                Ext.Msg.alert('Failure', 'Form fields may not be submitted with invalid values');
                break;
                case Ext.form.action.Action.CONNECT_FAILURE:
                Ext.Msg.alert('Failure', 'Ajax communication failed');
                break;
                case Ext.form.action.Action.SERVER_INVALID:
                Ext.Msg.alert('Failure', action.result.msg);
            }
        }
    });
    Last edited by aconran; 24 Jan 2013 at 10:22 AM. Reason: add code tags

Thread Participants: 3

Turkiyenin en sevilen filmlerinin yer aldigi xnxx internet sitemiz olan ve porn sex tarzi bir site olan mobil porno izle sitemiz gercekten dillere destan bir durumda herkesin sevdigi bir site olarak tarihe gececege benziyor. Sitenin en belirgin ozelliklerinden birisi de Turkiyede gercekten kaliteli ve muntazam, duzenli porno izle siteleri olmamasidir. Bu yuzden iste. Ayrica en net goruntu kalitesine sahip adresinde yayinlanmaktadir. Mesela diğer sitelerimizden bahsedecek olursak, en iyi hd porno video arşivine sahip bir siteyiz. "The Best anal porn videos and slut anus, big asses movies set..." hd porno faketaxi