# Html anchor links in a .txt file

**URL:** <https://forum.kirupa.com/t/html-anchor-links-in-a-txt-file/258690>\
**Category:** Uncategorized\
**Created:** [April 26, 2008, 9:23pm UTC](https://forum.kirupa.com/t/html-anchor-links-in-a-txt-file/258690 "2008-04-26T21:23:13Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Darqueness](https://avatars.discourse-cdn.com/v4/letter/d/48db29/32.png) [@Darqueness](https://forum.kirupa.com/u/Darqueness)\
**Post date:** [April 26, 2008, 9:23pm UTC](https://forum.kirupa.com/t/html-anchor-links-in-a-txt-file/258690/1 "2008-04-26T21:23:13Z")

</div>

Okay - so maybe I am going about this all the wrong way -

But I have text in a scrolling text box I want to be able to anchor “top of page” links to from various points in the page.

It’s a no brainer in HTML, but Flash isn’t liking the link/anchor hard coding I did to my .txt document

The document shows up fine, all the html formatting is there - but the anchor links aren’t working properly -

I used

myData = new LoadVars();  
myData.onLoad = function() {  
myText\_txt.html = true;  
myText\_txt.htmlText = this.myVariable;  
};  
myData.load(“content.txt”);

to call the file - which is working fine.

and in the .txt file I used

\<a name=“top”\>top\</a\> for the anchor  
\<a href="#top"\>Back to top\</a\> for the link

Suggestions?

If there is a better way to go about this, I am all ears - :ear:
