Error when adding Vault to Layout cell

Hi,

I get the following error when I try to add a Vault to a layout cell (which is inside a tab):

TypeError: tab1Layout.cells(…).attachVault is not a function
var myVault = tab1Layout.cells(“a”).attachVault();

I tried different samples which results always in the same error message.

This is the JS Code I currently use:

var myTabbar, myVault, gridApiFields, gridSourceFields, gridConverter;

function doOnLoad() {
	myTabbar = new dhtmlXTabBar({
		parent: "tabbarObj",
		tabs: [
			{ id: "a1", text: "CSV Upload", active: true },
			{ id: "a2", text: "Datenliste" },
			{ id: "a3", text: "Konverter" },
			{ id: "a4", text: "Matching" },
			{ id: "a5", text: "Bestandsverwaltung" }

		]
	});

//Tab 1 Upload
	tab1Layout = myTabbar.cells("a1").attachLayout({pattern:"2E", skin:"dhx_skyblue"});
	var myVault = tab1Layout.cells("a").attachVault();
.
.
.
.
.

And this is the HTML / Header:

<head>
	<title>Init from html</title>
	<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
    <script src="codebase/dhtmlx.js"></script>
	<link rel="stylesheet" type="text/css" href="codebase/dhtmlx.css"/>
	<link rel="stylesheet" type="text/css" href="dhtmlx/skins/terrace/dhtmlx.css"/>
	
	<script src="libs/main.js"></script>
	<link rel="stylesheet" type="text/css" href="codebase/dhtmlxtabbar.css"/>
	<script src="codebase/dhtmlxtabbar.js"></script>


    <link rel="stylesheet" type="text/css" href="codebase/dhtmlxgrid.css"/>
    <script src="codebase/dhtmlxgrid.js"></script>

	<link rel="stylesheet" type="text/css" href="codebase/dhtmlxvault.css"/>
	<script src="codebase/dhtmlxvault.js"></script>
	<script src="codebase/swfobject.js"></script>
		
</head>

I also tried this one ta add the vault to the cell without success:

[code]// window.dhx4.ajax.post(“upload_conf.php”, function®{
// var t = null;
// try {eval(“t=”+r.xmlDoc.responseText);}catch(e){};
// if (t != null) myVault = tab1Layout.cells(“b”).attachVault(t);
// myVault.attachEvent(“onBeforeFileAdd”, function(file){
// var ext = this.getFileExtension(file.name);
// return (ext==“csv”);
// });

//	myVault.attachEvent("onUploadComplete", function(files){
//	
		
//	});		

// myVault.setStrings({
// done: “Fertig”, // text under filename in files list
// error: “Fehler”, // text under filename in files list
// btnAdd: “CSV Datei wählen”, // button “add files”,
// btnUpload: “Hochladen”, // button “upload”
// btnCancel: “abbrechen”, // button “cancel uploading”
// btnClean: “Liste löschen”, // button “clear all”
// btnCss : “color : #00000;”,
// dnd: “Drop files here” // dnd text while the user is dragging files
// });

// });
[/code]

Any help would be greatly appreciated

Kind regards, Thomas

Hi

something wrong with order of included js in section (first should be dhtmlx.js and then dhtmlxvault.js but your code already has the same order). please send ud direct link or competed demo to support@dhtmlx.com

Hi

not sure why but your vault.js is about 17kb when should be 70kb
try to re-download dhtmlxVault.zip from our site dhtmlx.com/x/download/regular/dhtmlxVault.zip

Hi Andrei,

the file should be OK. 17kb is the transferred compressed size.
The file on the server is about 70kb:

71634 Sep 19 10:49 dhtmlxvault.js

I tried the source code from the demo which results in the same error. dhtmlx.com/docs/products/dhtmlxV … .html#code

And it also won´t work when I get the dhtml components from dhtmlx.com:

You can see it again on the page I sent you by email. Currently, there is the demo code running.

Kind regards, Thomas

Hi

now method attachVault() is okey, but your dhtmlx.js and vault.js are obfuscated, you need to replace:
try {eval(“t=”+r.xmlDoc.responseText);}catch(e){};
with
try {eval(“t=”+r.ai.responseText);}catch(e){};
to check how it will work

Yes, its working now !!

Many thanks for this.

Kind regards, Thomas