Check documentation for the latest version of dhtmlxSuite Integrating with DHTMLX DHTMLX Docs

Integrating with DHTMLX

This documentation is for Vault v2.5. Please go to docs.dhtmlx.com/vault/ to see documentation for the current version of dhtmlxVault.

dhtmlxVault can be attached to the following DHTMLX components:

Integration with Layout

To put a dhtmlxVault object to a layout's cell, use the attachVault method of the dhtmlxLayout:

var myLayout = new dhtmlXLayoutObject("layoutObj", "2U");
var myVault = myLayout.cells("a").attachVault({
    uploadUrl:  "server/uploader.php",          // html4/html5 upload url
    swfPath:    "dhxvault.swf",                 // path to flash uploader
    swfUrl:     "server/uploader.php",          // flash upload url
    slXap:      "dhxvault.xap",                 // path to silverlight uploader
    slUrl:      "https://server/uploader.php"   // silverlight url, FULL path required
});

Integration with Tabbar

To put a dhtmlxVault object to a tabbar's tab, use the attachVault method of the dhtmlxTabbar:

var myTabbar = new dhtmlXTabBar("tabbarObj", "top");
myTabbar.addTab("a1", "dhtmlxVault", "120px");
myTabbar.setTabActive("a1");
var myVault = myTabbar.cells("a1").attachVault({
    uploadUrl:  "server/uploader.php",          // html4/html5 upload url
    swfPath:    "dhxvault.swf",                 // path to flash uploader
    swfUrl:     "server/uploader.php",          // flash upload url
    slXap:      "dhxvault.xap",                 // path to silverlight uploader
    slUrl:      "https://server/uploader.php"   // silverlight url, FULL path required
});

Integration with Accordion

To put a dhtmlxVault object to a accordion's panel, use the attachVault method of the dhtmlxAccordion:

var myAcc = new dhtmlXAccordion("accordObj");
myAcc.addItem("a1", "dhtmlxVault");
var myVault = myAcc.cells("a1").attachVault({
    uploadUrl:  "server/uploader.php",          // html4/html5 upload url
    swfPath:    "dhxvault.swf",                 // path to flash uploader
    swfUrl:     "server/uploader.php",          // flash upload url
    slXap:      "dhxvault.xap",                 // path to silverlight uploader
    slUrl:      "https://server/uploader.php"   // silverlight url, FULL path required
});

Integration with Windows

To put a dhtmlxVault object to a window, use the attachVault method of the dhtmlxWindows:

var dhxWins = new dhtmlXWindows();
var w1 = dhxWins.createWindow("w1", 20, 30, 400, 350);
var myVault = w1.attachVault({
    uploadUrl:  "server/uploader.php",          // html4/html5 upload url
    swfPath:    "dhxvault.swf",                 // path to flash uploader
    swfUrl:     "server/uploader.php",          // flash upload url
    slXap:      "dhxvault.xap",                 // path to silverlight uploader
    slUrl:      "https://server/uploader.php"   // silverlight url, FULL path required
});

Integration with Popup

To put a dhtmlxVault object to a popup, use the attachVault method of the dhtmlxPopup:

var myPop = new dhtmlXPopup();
var myVault;
myPop.attachEvent("onShow", function(){
    if (!myVault) {
        myVault = myPop.attachVault(350, 200, {         // width and height
            uploadUrl:  "server/uploader.php",          // html4/html5 upload url
            swfPath:    "dhxvault.swf",                 // path to flash uploader
            swfUrl:     "server/uploader.php",          // flash upload url
            slXap:      "dhxvault.xap",                 // path to silverlight uploader
            slUrl:      "https://server/uploader.php"   // silverlight url, FULL path required
        });
        myVault.attachEvent("onUploadComplete", function(){
            // you can hide popup here
        });
    }
});
Back to top