Integrating with DHTMLX

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:      "http://server/uploader.php"    // silverlight url, FULL path required
});

Related sample:  Broken link: dhtmlxVault/samples/02_integration_with_dhtmlx/02_in_layout.html

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:      "http://server/uploader.php"    // silverlight url, FULL path required
});

Related sample:  Broken link: dhtmlxVault/samples/02_integration_with_dhtmlx/03_in_tabbar.html

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:      "http://server/uploader.php"    // silverlight url, FULL path required
});

Related sample:  Broken link: dhtmlxVault/samples/02_integration_with_dhtmlx/04_in_accordion.html

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:      "http://server/uploader.php"    // silverlight url, FULL path required
});

Related sample:  Broken link: dhtmlxVault/samples/02_integration_with_dhtmlx/01_in_window.html

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:      "http://server/uploader.php"    // silverlight url, FULL path required
        });
        myVault.attachEvent("onUploadComplete", function(){
            // you can hide popup here
        });
    }
});

Related sample:  Broken link: dhtmlxVault/samples/02_integration_with_dhtmlx/05_in_popup.html

Back to top