Need help using ajax
Need help using ajax
Hey Guys. I am new with ajax, and I am trying to retrieve data and append it to a div tag. For some reason my code below doesn't seem to work :(
- $(function(){
- $.ajax({ url: "testdata.txt",
- type: "GET",
- dataType: "text",
- success: "successFN" }); // End of $.ajax
- function successFN(result) { $("#result").append(result); } });// End of function
- </script>
</head>
<body>
<div id="result"></div>
</body>
</html>