Attach vault to layout

Attach vault to layout
 
</> Source
<!DOCTYPE html>
<html>
<head>
	<title>Attach vault to layout</title>
	<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
	<meta http-equiv="X-UA-Compatible" content="IE=edge"/>
	<link rel="stylesheet" type="text/css" href="../../../codebase/dhtmlx.css"/>
	<link rel="stylesheet" type="text/css" href="../../../codebase/fonts/font_roboto/roboto.css"/>
	<link rel="stylesheet" type="text/css" href="../../../codebase/dhtmlxvault.css"/>
	<script src="../../../codebase/dhtmlx.js"></script>
	<script src="../../../codebase/dhtmlxvault.js"></script>
	<script src="../../../codebase/swfobject.js"></script>
	<style>
		div.sample_title {
			font-size: 14px;
			font-family: Roboto, Arial, Helvetica;
			color: #404040;
			font-weight: 500;
			margin: 15px 1px;
		}
		div#maxsize_info {
			font-size: 14px;
			font-family: Roboto, Arial, Helvetica;
			color: #404040;
			margin: 16px 1px 20px 1px;
		}
		div#layoutObj {
			position: relative;
			width: 600px;
			height: 400px;
		}
	</style>
	<script>
		// in case of attach to dhtmlx component
		// vault.js should be included after dhtmlx.js
		var myLayout, myVault;
		function doOnLoad() {
			if (typeof(dhtmlXLayoutObject) == "undefined") {
				alert("dhtmlxLayout required for this demo.");
				return;
			}
			myLayout = new dhtmlXLayoutObject("layoutObj", "2U");
			myLayout.cells("a").setText("dhtmlxVault");
			window.dhx4.ajax.get("../server/upload_conf.php", function(r){
				var t = window.dhx4.s2j(r.xmlDoc.responseText);
				if (t != null) {
					myVault = myLayout.cells("a").attachVault(t);
					// update max file size notice
					document.getElementById("maxsize_info").innerHTML = "Upload max filesize: "+myVault.readableSize(t.maxFileSize);
				}
			});
		}
	</script>
</head>
<body onload="doOnLoad();">
	<div class="sample_title">Attach vault to layout</div>
	<div id="maxsize_info">&nbsp;</div>
	<div id="layoutObj"></div>
</body>
</html>

Documentation

Check documentation to learn how to use the components and easily implement them in your applications.