The ext foreground receives the JSON data that the action passes over
Copy Code code as follows:
Ext.Ajax.request ({
Method: ' POST ',//Request mode
Params: {Dagl_code:dagl_code},
url:lcwpath+ "/daxt/lcgl.shtml?method=getjgbycode",//requested URL address
Success:function (response, opts) {
if (response.responsetext!= ' {} ') {
alert (Response.responsetext);
<span style= The first method of "Background-color: #ffcc99" >//
var dagl_jg = Ext.util.JSON.decode (response.responsetext). Dagl_jg;
The second method
var json = eval ("+ Re.responsetext +"));
var dagl_jg= json.dagl_jg;
</span>
var org_mc = Ext.util.JSON.decode (response.responsetext). ORG_MC;
var lccode = Ext.util.JSON.decode (response.responsetext). Lccode;
var lcname = Ext.util.JSON.decode (response.responsetext). Lcname;
EXT.GETCMP ("JGs"). Combohidden.setvalue (DAGL_JG);
EXT.GETCMP (' JGs '). SetValue (ORG_MC);
EXT.GETCMP (' Dagl_jg '). SetValue (DAGL_JG);
EXT.GETCMP (' SSLC '). SetValue (Lccode);
EXT.GETCMP (' SSLC '). Setrawvalue (Lcname);
var dagl_jg = ext.getcmp (' JGs '). Combohidden.getvalue ();
Lcstore.proxy = new Ext.data.HttpProxy ({Url:lcwpath + '/daxt/lcgl.shtml?method=getdaxx&dagl_type=l&dagl_jg= ' + DAGL_JG});
Lcstore.load ();
EXT.GETCMP (' LCBH '). SetValue (');
}else{//value not, empty info
Ext.MessageBox.show ({
Title: ' Hint ',
Msg:config.string.NOTNUMBERMSG_OR_NUMBERLOSEEFFICACY,
minwidth:270,
Icon:Ext.MessageBox.WARNING,
buttons:{"OK": "Close"},
Fn:function (e) {Ext.MessageBox.hide ();},
Closable:true
});
EXT.GETCMP ("JGs"). SetValue ("");
EXT.GETCMP ("LCBH"). SetValue ("");
}
},
Failure:function (response, opts) {
Ext.MessageBox.show ({
Title: ' System hints ',
Msg: ' System has unexpected exception ',
minwidth:270,
Icon:Ext.MessageBox.WARNING,
buttons:{"OK": "Close"},
Fn:function (e) {Ext.MessageBox.hide ();},
Closable:true
});
}
});