我想打一個隱藏的形式,我可以使用form.submit提交。我無法使用Ext.Ajax.request,因爲我也在上傳文件。如何提交表單而不先呈現?
我有什麼:
function uploadRequest(){
var hiddenTextField = new Ext.form.TextField({
id: 'hiddenTextField'
});
var gridForm = new Ext.FormPanel({
id: 'hiddenForm',
fileUpload: true,
items: [hiddenTextField]
});
hiddenTextField.setValue('Test Value');
var form = Ext.getCmp('hiddenForm').getForm();
form.load(); // I want this to load hiddentextfield into the form?
form.submit({
url: '/main/grabValue',
waitMsg: 'Uploading...'
});
}
這工作如果不是form.load()我在補充:
var win = new Ext.Window({
height: 450,
width: 450,
closable: true,
items: [gridForm]
});
//I need something like a form.render that doesn't actually render here.
//hack that renders the form but also makes and shows a completely unnecessary form.
win.show();
如何使用內置形式的勿使表單提交的功能?
渲染它關閉屏幕。 –