How to scan a folder for documents with javascript
var dir = "/videos";
var fileextension = ".mp4";
$.ajax({
//This will retrieve the contents of the folder if the folder is configured as 'browsable'
url: dir,
success: function (data) {
// List all mp4 file names in the page
$(data).find("a:contains(" + fileextension + ")").each(function () {
var filename = this.href.replace(window.location.host, "").replace("http:///", "");
$("body").append($("<img src=" + dir + filename + "></img>"));
});
}
});
Also in JavaScript:
- javacript is checkbox checked
- vscode default indent type
- if window width jquery then display a div at scroll
- do nonmetals lose electrons
- simple alert program in javascript
- how to split index.js to routes nodejs
- reset value object js
- angular 8 to 9
- react native backgrunde img
- add countdown timer to javascript quiz
- find year javascript
- js get element by class
- object literal javascript
- Material-ui alarm icon
- how to get the end of an array javascript
- download videos "hotmart" javascript github
- javascript tabs example
- js loop
- populate DataTable from django json
- how to count duplicates in an array javascript
- react native different status bar configuration based on route
- how to convert to binary in javascript
- jquery value of input
- how to remove a value from an array and return the new array in javascript