<script type="text/javascript">
$(document).ready(function () {
$("#readFile").click(function () {
debugger;
$.get(ServerUrl + "/Vi/Gr/abcd.txt", function (data) {
$("#container").html(data);
}, 'text');
//$(".text").load(ServerUrl + "/Gr/abcd.txt");
//$("#container").load(ServerUrl + "/Vi/Gr/abcd.txt");
});
});
</script>
<button id="readFile" style="margin-top:50px;">Read File</button>
<div id="container" style="border-style:solid;height:300px;"></div>
Above is my code for reading the contents of a file using jquery and html. I keep getting file not found errors and other errors . For e.g
Uncaught TypeError: Cannot read property 'apply' of undefined.
What I am doing wrong. Please help.