1
How to select a folder or file from javascript
Question asked by Peter Drugge - 10/2/2019 at 5:44 AM
Unanswered
I have a webpage that uses one instance of a FileUltimate file manager. On that page I have several input boxes. The user can click on an input box to open a file picker. When a file has been selected, the input box gets updated with the file name. This works great. 

BUT, when the user clicks on a input box with an already selected file, the file picker is opened up in the root folder. I want to be able to either select the folder where the file is in or, even better, to select the actual file. I know that I can choose an InitialFolder on server side, but since I use one manager for all inputs I need to do it in javascript when the fileManager is opened.

Is there a way to manually select a folder or file using javascript? For example:
fileManager.show();
fileManager.selectFolder('[Drive]:/folder1/folder2');

Thanks

1 Reply

Reply to Thread
0
Peter Drugge Replied
I found a way:

fileManager.initialFolder = "[Drive]:\folder1\folder2";
fileManager.loadInitialFolder();
fileManager.show();

Please let me know if there is some way to select a file in a similar way.

Reply to Thread