根据该文档的
form.submit,它看起来像在响应 要求
是JSON或XML,格式如下所示:
{ success: true, data: { url: "http://somewhere", somedata: "whatever you want" }}在Javascript的成功处理程序中,您可以引用
o.data.[variable]以获取自定义数据。
不幸的是,您将需要更改
submitData method(在您的控制器中)以按照上面定义的结构返回JSON响应对象。在响应对象中,您可以包含的URL
save-form.html。然后,您可以在成功处理程序中为其发出另一个GET请求。
我不知道这是否行得通,因为我没有使用Ext JS的经验,但是我会设想成功处理程序看起来像这样:
success: function(fp, o) { Ext.Msg.alert('Success', 'Form submitted.'); Ext.Ajax.request({ url: o.data.url, method: "GET", success: function(response, request) { // do whatever you need to with the generated HTML alert(response.responseText); }, failure: function(response, request) { alert('failed'); } });}


