This is the script I have
<div id="result"></div>
<script src="jquery-1.10.2.min.js"></script>
<script>
$('#year li').click(function() {
var text = $(this).text();
//alert('text is ' + text);
$.post("B.php",
{
text: text,
} );
event.preventDefault() ;
});
</script>
it executes a php script when a list item is clicked. The script B.php creates a few txt files. lets call one of them ddd.txt. Now I want to load the contents of the file ddd.txt onto the div with id result when the click has been made. Can someone help me with it?