Display content of text file dynamically?

Display content of text file dynamically?

I have a script that populates a text counter using the ID of the <A> link (code here).  Is there a way I could display text counter content next to the <A> link, using variables, without specifying the actual text filename?
 
  1. <a href="docs/0_FAQs.docx" target="_new" id="tracklink_faq"><img src="assets/faq.png" alt="faq-icon" width="144" height="141" border="0" /></a>
    Maybe something that can look at the <a> ID to specify the text file name:
     
    1. <div id="report_faq">
    2. <script>$("[id^=report]").load(......id of <a> to the left.....+".txt");</script>
    3. </div>
                Until I figure this out, I'll just specify the direct path to the text counter that corresponds with the <a> link.
              1. <div id="report_faq">
              2. <script>$("[id^=report]").load("counters/tracklink_faq-counter.txt");</script>
              3. </div>