存档

文章标签 ‘dhtmlxVault’

dhtmlxVault中文学习资料

2013年4月14日 没有评论

Initialize object on page

<div id="vaultDiv"></div>
vault = new dhtmlXVaultObject();
vault.setImagePath("codebase/imgs/");
vault.setServerHandlers("UploadHandler.php", "GetInfoHandler.php",
		"GetIdHandler.php");
vault.setFilesLimit(1);// 控制文件的上传数量:0不限制,1只能是一个
// 检测文件的上传类型
vault.onAddFile = function(fileName) {
	var ext = this.getFileExtension(fileName);
	if (ext != "txt" && ext != "doc") {
		alert("You may upload only text documents "
				+ "(txt, doc). Please retry.");
		return false;
	} else {
		return true;
	}
};

//Use onUploadComplete event handler to update your DhtmlX controls or check the upload status.
回调函数(对所有上传文件的处理)

阅读全文…