接上......Js页面:关键代码:url: '../../imageupload?stylePath=image&post=add&id='+getRequestParame("id"),其他是一些布局 function upload(fb){ if(addPanel.getForm().isValid()){ alert(addPanel.items.items[0]...
显示全部接上......
Js页面:
关键代码:url: '../../imageupload?stylePath=image&post=add&id='+getRequestParame("id"),
其他是一些布局
function upload(fb){ if(addPanel.getForm().isValid()){ alert(addPanel.items.items[0].getValue()); addPanel.getForm().submit({ success: function(fp, action){ //Ext.Msg.alert('信息', action.result.message); //alert(parent.dbsx_panel); alert(uploadwindow.id); }, failure: function(fp, action){ Ext.Msg.alert('错误', action.result.message); } }); }}function createAddPanel(){ Ext.QuickTips.init(); Ext.form.Field.prototype.msgTarget = 'side'; var fp = new Ext.FormPanel({ fileUpload: true, width: 500, frame: true, title: '上传签名', autoHeight: true, bodyStyle: 'padding: 10px 10px 0 10px;', labelWidth: 50, url: '../../imageupload?stylePath=image&post=add&id='+getRequestParame("id"), defaults: { anchor: '95%', allowBlank: false, msgTarget: 'side' }, items: [{ xtype: 'textfield', fieldLabel: '文件名', name: 'file', inputType: 'file', //ļ anchor:'95%' }], buttons: [{ text: '确定', handler: function(){ if(fp.getForm().isValid()){ //alert(fp.items.items[0].getValue()); fp.getForm().submit({ success: function(fp, action){ parent.alertMsg(action.result.message,'信息'); parent.reloadData(); parent.window_add.close(); //alert(uploadwindow.id); }, failure: function(fp, action){ Ext.Msg.alert('错误', action.result.message); } }); } } },{ text: '重置', handler: function(){ fp.getForm().reset(); } }] }); fp.render("addPanel");}Ext.onReady(function(){Ext.QuickTips.init(); Ext.BLANK_IMAGE_URL = '../../images/s.gif'; createAddPanel();});
接下......
收起