Jul 01, 2013, 8:37 AM
[CLOSED] for submit to webservice
I am in trouble to make correct call to web service. Form values are being submitted correctly the only problem is that webservice respond in xml despite that [System.Web.Script.Services.ScriptService] is uncomment, It throws an error on response. Ext.JSON.decode(): You're trying to decode an invalid JSON String:
for exampe
for exampe
createNewAssets: function () {
var frm = Ext.getCmp('frmAddNewAsset').getForm();
frm.submit({
url: '../../stores/assets.asmx/saveNewAssets',
cleanRequest: true,
json: true, //it is not working
params: {
newAsset: frm.getValues(true)
}
success: function (form, action) {
Ext.Msg.alert('Success', action.result.msg);
}
})
[WebMethod]
public string saveNewAssets() {
return "{'success' : true , 'msg' : 'Success' }" ;
}
Last edited by Daniil; Jul 10, 2013 at 3:51 AM.
Reason: [CLOSED]