need to integrate Vault with Scheduler

We are successfully using Scheduler to show appointments on a calendar. I want to add the ability for the user to upload a file to associate with an appointment. I’ve tried 2 approaches but neither has quite worked, so I’m asking for advice.

First approach: I first tried to add a button to a Scheduler lightbox header (see upper right corner of attachment). The Vault didn’t display properly. I then tried to put the Vault inside your Windows component, thinking I needed to create a modal popup in front of the lightbox. It displayed, but improperly with no frame around the popup, no buttons to dismiss it.

Second approach: I then added a vaultDiv to a custom section on my Scheduler lightbox (you can see the Invoice section in the attachment). The appointment opens, but the section is empty. I’ve included some code below.

Which is the best approach for me to take, or would you suggest another?

Thanks - Ray

Here’s the code I currently have for the Vault in a Scheduler section (for simplicity I’ve mixed a little of my .aspx C# code and the JavaScript):

/* Here’s the contents of the section */
var invoiceHTML = "

Invoice: View Invoice

/* Here’s the definition of the section and its handlers */
scheduler.form_blocks[“invoice”] = {
render:function(sns) {
return invoiceHTML;
set_value:function(node, value, event) {
var block = invoiceHTML;
if (event.HasInvoice == 1) {
block = block.replace(“$invoicePath$”, event.InvoicePath);

            vault = new dhtmlXVaultObject();
            vault.setServerHandlers("UploadHandler.ashx", "GetInfoHandler.ashx", "GetIHandler.ashx");
            vault.setFilesLimit = 1;

            vault.onUploadComplete = function (files) {
                alert("Files uploaded!");

        get_value:function(node, event) {

/* Here’s the definition of the lightbox */
var fleetLightbox = [
{ name: “details”, map_to: “Details”, type: “details”, button:“uploadInvoice” },
{ name: “complete”, height: 30, type: “complete” },
{ name: “invoice”, type: “invoice” },
{ name: “shopNotes”, height: 60, map_to: “ShopNotes”, type: “textarea”, focus: true }