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