How To Browse For A File Or Folder Path
This is part three in a series on popups and browse windows.
Browse For A File
There's a form field method called browseForFileToSubmit that opens a browse window for the user to drill down and select a file. Once the file is selected the value of text field becomes the path to the file, including the file name and extension. I don't believe there are any restrictions on the file type that can be selected because nothing is being done with the file at this point. It's simply a matter of obtaining the file path.
Text Field Properties
The browseForFileToSubmit method is executed on the field object like this:
this.getField("FilePath").browseForFileToSubmit();While "FilePath" can be the name of any text field you create it must have the fileSelect property set to true or the method will fail.




