在Extjs中提交表单后,无法从服务器获得JSON响应


Unable to get the JSON response from server into the store after form submission in Extjs

我有一个登录表单,提交用户名,密码值到服务器上提交按钮单击。

var form = this.up('form').getForm();
    if (form.isValid()) {
        form.submit({
            url: '', //this is the url where the form gets submitted
            success: function(form, action) {
               Ext.Msg.alert('Success', action.result.msg);
            },
            failure: function(form, action) {
                Ext.Msg.alert('Failed', action.result.msg);
            }
        });
    }

但是在提交按钮后,单击Web页面(Web应用程序)被重定向到我为表单提交提供的URL,显示服务器的响应。

我需要将来自服务器的JSON响应存储到存储中,而不需要重定向并保持在同一页面上。

请帮我解决这个问题。

提前感谢。

设置表单的standardSubmit属性为false:

Ext.create('Ext.form.Panel', {
    standardSubmit: false,
    ...