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