-
-
-
-
-
-
-
-
-
-
-
- function ajaxCall(urlStr, paramsObj, callbackFunc) {
- Ext.Ajax.request({
- url : urlStr,
- params : paramsObj,
- method : 'POST',
- success : function(response) {
- if (callbackFunc) {
- var result = Ext.util.JSON
- .decode(response.responseText);
- var cbfn = callbackFunc.createCallback(result);
- cbfn();
- }
- },
- failure : function() {
- Ext.Msg.alert("提示", "方法调用失败");
- }
- });
- }
-
-
-
-
-
-
-
-
-
-
- function ajaxSyncCall(urlStr, paramsStr) {
- var obj;
- var value;
- if (window.ActiveXObject) {
- obj = new ActiveXObject('Microsoft.XMLHTTP');
- } else if (window.XMLHttpRequest) {
- obj = new XMLHttpRequest();
- }
- obj.open('POST', urlStr, false);
- obj.setRequestHeader('Content-Type', 'application/x-www-form-urlencoded');
- obj.send(paramsStr);
- var result = Ext.util.JSON.decode(obj.responseText);
- return result;
- }
posted @
2011-09-21 19:21
左正
阅读(
689)
评论()
编辑
收藏
举报