How to read directory using jQuery .ajax()?
- by C.W.Holeman II
Using jQuery .ajax() to read "./ex.html" returns the expected contents of the file.
Using the same call just changing the request to "./" does not return an expected directory listing.
<html>
<head>
</head>
<body>
<script type="text/JavaScript" src="jquery.js"></script>
<script type="text/JavaScript">
alert($.ajax({type: "GET", url: './ex.html', async: false}).responseText);
alert($.ajax({type: "GET", url: './', async: false}).responseText);
</script>
</body>
</html>