Venkatesh K H

Venkatesh K H

  • NA
  • 116
  • 33.5k

How to display images from server folder using javascrip

Jul 25 2017 3:02 AM
I have uploaded the files in the server folder with the name upload. The images are uploading into the that folder but now how to get all those images from upload folder and display all the images using javascript or ajax. please help. I have tried this code but didn't work. 
 
<script type="text/javascript">
function uploadStarted() {
$get("imgDisplay").style.display = "none";
}
function uploadComplete(sender, args) {
var imgDisplay = $get("imgDisplay");
imgDisplay.src = "upload";
imgDisplay.style.cssText = "";
var img = new Image();
img.onload = function () {
imgDisplay.style.cssText = "height:100px;width:100px";
imgDisplay.src = img.src;
};
img.src = "upload" + args.get_fileName();
}
</script>
 

Answers (1)