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

Refreshing FileVistaControl

Hi, I have a FileVistaControl that I am using to show a folder than I am uploading into. Once I upload, I would like to refresh the control to show to the user that their files have been saved. Any way to do that?

Thanks
Rick 4/12/2010 2:05 PM
I found an answer in this response http://www.gleamtech.com/support/forums/4078/how-to-refresh-filevistacontrol

But I do not need to refresh the whole document, just the FileVistaControl. Is this possible?

Any help would be greatly appreciated
Rick 4/14/2010 7:42 AM
Hi,
Actually this command does not refresh the whole document. It's a function of FileVistaControl for refreshing the contents of the currently displayed folder:

executeCommand("Refresh");

This JS function should be called in the scope of the control, ie. in the page scope where the control is added.
Cem Alacayir 4/19/2010 8:34 AM
Hi Cem thanks for your time. So in my page I have a FileVistaControl like so:

        <GleamTech:FileVistaControl ID="FileVistaControl" runat="server" 
                                Style="width: 800px; height: 450px" 
                                LicenseKey="XXX"
                                Debug="false"
                                Fullscreen="false"
                                UploadMethod="Browser">
            <RootFolders>
                <GleamTech:FileVistaRootFolder Name="Repository Root" 
                                               Path="C:\Repository"
                                               Permissions="Full" />
            </RootFolders>
        </GleamTech:FileVistaControl>

As well as a link

<a id="refresh" href="javascript:executeCommand("Refresh");" >Refresh</a>

On the same page, that should work? It is not working, where is this JS method located? I do not see it anywhere in my solution. Please help!

Rick 4/19/2010 11:36 PM
Still stuck! Tried jQuery just for fun but didn't work any better :(

function refreshFVC() {
    $('#FileVistaControl').executeCommand("Refresh");
}
Rick 4/21/2010 10:32 AM
I'm still having trouble with this issue. I wish there was more support for this product, I am trying to sell a solution to my coworkers that utilizes the FileVistaControl but I have serious doubts about the ability to solve issues that come up if a simple question like this takes two weeks (I started this thread on the 12!) for an explanation and example to solve my issue.

-Rick
Rick 4/25/2010 8:56 PM
Rick,
Sorry but I already answered your question. Actually the problem is your syntax and not the command. You say you put a link like this:

<a id="refresh" href="javascript:executeCommand("Refresh");" >Refresh</a>

You know when you place javascript code within HTML attributes, you should convert double quotes to single quotes:

<a id="refresh" href="javascript:executeCommand('Refresh');" >Refresh</a>
Cem Alacayir 4/26/2010 3:26 AM