浏览 927 次
|
精华帖 (0) :: 良好帖 (0) :: 新手帖 (0) :: 隐藏帖 (0)
|
|
|---|---|
| 作者 | 正文 |
|
最后更新时间:2007-08-17 关键字: 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... } }); 声明:JavaEye文章版权属于作者,受法律保护。没有作者书面许可不得转载。
|
|
| 返回顶楼 | |


