当前位置: 代码迷 >> Ajax >> Ext Form 提交的有关问题
  详细解决方案

Ext Form 提交的有关问题

热度:341   发布时间:2012-03-09 21:42:55.0
Ext Form 提交的问题 - Web 开发 / Ajax
貌似最近Extjs挺火的样子,碰巧最近做的一个项目也是基于Extjs的,但是基本控件都封装好了,开发起来挺无脑的说,于是自己下下来捣鼓了一下,我用的框架是STRUTS2+EXTJS,页面FORM是用EXT的FORM,提交AJAX请求没什么问题,现在我想做的是提交表单,页面跳转,引用文档
A class which handles submission of data from Forms using a standard <form> element submit. It does not handle the response from the submit.

If validation of the form fields fails, the Form's afterAction method will be called. Otherwise, afterAction will not be called.

Instances of this class are only created by a Form when submitting, when the form's Ext.form.Basic.standardSubmit config option is true.

我已经把FORM的standardSubmit设true了,而报错结果竟然是EXT想要把我要跳转到的页面当成JSON解析出来,报的you're tring to decode an invalid JSON String,不是说不处理提交的结果吗?

------解决方案--------------------
JScript code

//配置项
oForm    = new Ext.FormPanel({
standardSubmit:true,
method:'POST',
onSubmit: Ext.emptyFn,
....
});
递交的时候
oForm.submit(); 
  相关解决方案