function updateHTMLDirList(returnData) { var dirPath = returnData.getElementsByTagName('PATH_HEAD')[0].innerHTML; var dirs = returnData.getElementsByTagName('DIR'); var videos = returnData.getElementsByTagName('VID_FILE'); var images = returnData.getElementsByTagName('IMG_FILE'); var files = returnData.getElementsByTagName('FILE'); var insertArea = document.getElementById('dynDiv'); var i = 0; var size = 0; // Insert dirs document.getElementById("path").innerHTML = dirPath; insertArea.innerHTML = ""; // Remove . and ../ if in "root" if (dirPath === "./") { var i = 2 } size = dirs.length; for (; i < size; i++) { var dir = dirs[i].innerHTML; if (dir != "resources/") { insertArea.innerHTML += "