Is there a 2 string that lets you choose the path of a folder? Any solution with jquery or html or jsp? I need this kind of solution, the client must choose the path of the folder from the hard disk
If you want an existing directory path or folder here is jsp code
& lt;% string folder = request .get realpath (""); & Gt%; Otherwise & lt; Input type = "file" id = "fileBrowser" onchange = "test ()" /> Use which allows you to choose the file dynamically You must select an actual file, or the dialog box will not be removed. You can select a file in the desired folder, and then you can use a simple script to cut the file portion of the path.
& lt; Script type = "text / javascript" & gt; Function Test () {var filePath = document.getElementById ("fileBrowser"). Values; Var index = filePath.lastIndexOf ("\\"); Warning (filePath.substring (0, index)); } & Lt; / Script & gt; Assume that you choose a file from the following path D: / test / filetest and you need the folder name of the "D: / test" file that is looking for you, the following link See I have pasted the code there.
Comments
Post a Comment