I don’t mind using beefed up JavaScript-based tools like Node.js, if that lets me avoid server-side scripting.
What about using XMLHttpRequest() ? I just tried it, and it does work to retrieve the contents of the page.
The next step would be to use a regex to extract the filenames from the first column.
<html>
<body>
<script type="text/javascript">
function loadXMLDoc(theURL)
{
if (window.XMLHttpRequest)
{// code for IE7+, Firefox, Chrome, Opera, Safari, SeaMonkey
xmlhttp=new XMLHttpRequest();
}
else
{// code for IE6, IE5
xmlhttp=new ActiveXObject("Microsoft.XMLHTTP");
}
xmlhttp.onreadystatechange=function()
{
if (xmlhttp.readyState==4 && xmlhttp.status==200)
{
alert(xmlhttp.responseText);
}
}
xmlhttp.open("GET", theURL, false);
xmlhttp.send();
}
var xmlhttp=false;
//loadXMLDoc('http://192.168.0.12:8080/list.txt');
loadXMLDoc('http://192.168.0.12:8080/testdir/');
if(xmlhttp==false)
{ /* set timeout or alert() */ }
else
{ /* assign `xmlhttp.responseText` to some var */ }
var contents = xmlhttp.responseText;
alert(contents);
</script>
</body>
</html>