In the body of HTML I have <input type="file" id="img" multiple><br>
<input type="submit" onclick="loadfiles()">
In Javascript I have:
function loadfiles() {
var viewer = new PhotoViewer();
var imageFiles = document.getElementById("img"),
filesLength = imageFiles.files.length;
for (var i = 0; i < filesLength; i++) {
viewer.add('./Slide1/'+imageFiles.files[i].name);
}
viewer.show(0);
Here, what I am doing is selecting multiple files from the specific folder and those files are showing in the jQuery slider. But I want to do it as a combobox of folders: whichever folder I choose, it will show all the images present in that folder using the same jQuery slider.
<form name=myform>
<select id="mytextarea" name=mytextarea size=1>
<option name=one value=one> one </option>
<option name=two value=two> two </option>
<option name=three value=three > three </option>
<option name=four value=four> four </option>
</select>
</form>
How can I can get a link to the folder?
You can pass reference of combo Box to function
<input type="file" id="img" multiple><br>
<input type="submit" onclick="loadfiles(this)">
function loadfiles(obj) {
var selectedOption = obj.val();
}
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With