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);
}
}
});