Ext 文件上传用Ext.ux.UploadDialog问题
用firefox调试报错:
this.id.indexOf is not a function
[Break on this error] Ext.DomHelper=function(){var s=null,j=/^...b.stopEvent();this.completeEdit()}}}});\n
页面:
<%@ page language="java" contentType="text/html; charset=UTF-8"
pageEncoding="UTF-8"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<link rel="stylesheet" type="text/css" href="../../ext3/resources/css/ext-all.css" />
<script type="text/javascript" src="../../ext3/adapter/ext/ext-base.js"> </script>
<script type="text/javascript" src="../../ext3/ext-all.js"> </script>
<script type="text/javascript" src="../../ext3/src/locale/ext-lang-zh_CN.js"></script>
<link rel="stylesheet" type="text/css" href="Ext.ux.UploadDialog.css" />
<script type="text/javascript" src="Ext.ux.UploadDialog.js"></script>
<script type="text/javascript" src="Ext.ux.UploadDialog.packed.js"></script>
<title>Insert title here</title>
</head>
<body>
<script language="javascript">
Ext.onReady(function() {
var form = new Ext.form.FormPanel({
renderTo:document.body,
labelAlign: 'right',
title: '文件上传',
labelWidth: 60,
frame:true,
width: 300,
height:200,
fileUpload: true,
buttons: [{
text: '上传',
handler: function() {
upload() ;
}
}]
});
function upload()
{
dialog=new Ext.ux.UploadDialog.Dialog({
title:'文件上传__上传过程中关闭窗口,不影响上传_wayfoon',
url:'',
width:450,
height:300,
minWidth:450,
minHeight:300,
draggable:true,
resizable:true,
//autoCreate:true,
constraintoviewport:true,
permitted_extensions:['JPG','jpg','jpeg','JPEG','GIF','gif','bmp','BMP'],
modal:true,
//post_var_name:'mms',
reset_on_hide:false,
allow_close_on_upload:true,//关闭上传窗口是否仍然上传文件
upload_autostart:false//是否自动上传文件
});
dialog.show();//'show-button'
dialog.on('uploadsuccess',onUploadSuccess);
}
});
</script>
</body>
</html>