2007-08-17
学习和应用extjs Developing with Extjs - tricks and tips. (2)
关键字: ajax extjs
来源http://www.akbkhome.com/blog.php/View/137/Developing_with_Extjs__tricks_and_tips.html
接触Extjs's XMLHttpRequest 调用
Extjs's XMLHttpRequest 可以取代传统德XMLHttp来调用远程服务
例如:
dialog.el.mask("Saving...");
var con = new Ext.data.Connection();
con.request({
url: baseURL + "/mypage.txt", // where to post to..
params: params, // << key value object with data to send
method: 'POST',
callback: function(opts, success, response) {
dialog.el.unmask(true); // unmask the dialog.
if (!success || ("OK" != response.responseText)) {
Ext.MessageBox.alert("Error", success ?
response.responseText :
"Error saving data - try again");
return;
}
dialog.hide();
// code to update stuff that's affected by the saved form working..
// goes here...
}
});
接触Extjs's XMLHttpRequest 调用
Extjs's XMLHttpRequest 可以取代传统德XMLHttp来调用远程服务
例如:
dialog.el.mask("Saving...");
var con = new Ext.data.Connection();
con.request({
url: baseURL + "/mypage.txt", // where to post to..
params: params, // << key value object with data to send
method: 'POST',
callback: function(opts, success, response) {
dialog.el.unmask(true); // unmask the dialog.
if (!success || ("OK" != response.responseText)) {
Ext.MessageBox.alert("Error", success ?
response.responseText :
"Error saving data - try again");
return;
}
dialog.hide();
// code to update stuff that's affected by the saved form working..
// goes here...
}
});
- 浏览: 13507 次
- 性别:

- 来自: 北京

- 详细资料
搜索本博客
最近加入圈子
最新评论
-
用Spring将Shark集成到你 ...
有没有示例啊
-- by philip_kissme -
学习和应用extjs Developi ...
朋友,如果你只是转载文章的话,是不错哦.
-- by skyey -
学习和应用extjs Developi ...
有啥话不能一口气说完?
-- by 会飞的狗 -
请大家来讨论下“会使软件 ...
两位朋友说得很好 对于:“3过分扩大某个解决方案的适用范围” 就我的理解,来举个 ...
-- by tacone -
请大家来讨论下“会使软件 ...
我现在就只能说说我对这些内容的一些看法,可能有些钻牛角尖的感觉。而要知道这背后的 ...
-- by ozzzzzz






评论排行榜