These forums are read-only and considered to be an archive. Please use the new Community for future interaction and posts.

Modifying filevista.js

Just purchased your product this morning.  So far so good, however, I am stuck.

We have a requirement to be able to open files, edit them, then save the files.  That piece I have done.

However, I am in need of obtaining the UNC path of the selected file after they double click on it or click on the download icon.

I found the following code under executeCommand:

 case"Download":
                        var row=(getClassName(parameter)=="Row")?parameter:grid.getSelectedFirstRow();
                        var fileName=row.cells[nameColumn.index];
                        downloadFile(currentFolder.rootFolderID,currentFolder.relativePath,fileName);
                        break;

However, I am unable to locate the variable that provides the UNC path.  I would have thought currentFolder.relativePath would have done it, but it only provides the folder name.  I need the FULL UNC path to be sent as a paramter in the downloadFile function.

Here is what I am doing:

function downloadFile(rootFolderID,relativePath,fileName,inline,deleteFile)
{
   
    var strUNC = "\\\\snap2255580\\WebBackups\\LIVEWebFiles\\SharedDocs\\";
    startXL(strUNC + relativePath + "\\" + fileName);
}

function startXL(strFile)
{

 var objExcel;
 objExcel = new ActiveXObject("Excel.Application");
 objExcel.Visible = true;
 objExcel.Workbooks.Open(strFile);

}

Note that I am hard coding the UNC Path in downloadFile.  I need this to be passed in.

Help !! :)

Thanks!
Scott SCriver 7/9/2009 4:04 PM
Please help -- I really need a response to the above.

Thanks!
Scott SCriver 7/12/2009 5:10 PM
Hi Scott,
For security reasons, the control will not expose the underlying physical path on the client side.
However, you can add hidden form values to your host page and then read them from Javascript to find out which rootFolderID corresponds to which physical path.
Cem Alacayir 7/21/2009 3:55 PM