# Loading html data from a text file

**URL:** <https://forum.kirupa.com/t/loading-html-data-from-a-text-file/21919>\
**Category:** Uncategorized\
**Created:** [May 28, 2003, 12:03am UTC](https://forum.kirupa.com/t/loading-html-data-from-a-text-file/21919 "2003-05-28T00:03:52Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![martystudio](https://avatars.discourse-cdn.com/v4/letter/m/c37758/32.png) [@martystudio](https://forum.kirupa.com/u/martystudio)\
**Post date:** [May 28, 2003, 12:03am UTC](https://forum.kirupa.com/t/loading-html-data-from-a-text-file/21919/1 "2003-05-28T00:03:52Z")

</div>

i have a code that will load text from a text file and put it in a dynamic text field:

loadText = new loadVars();  
loadText.load(“main.txt”);  
// creating the loadVarsText function  
loadText.onLoad = function() {  
Content.text = this.start;  
};

Thats good and all but, i want it to load it and process it as html cause i was going to put this in the text file(main.txt)…

Hello, contact me at \<a [href="me@myserver.com](mailto:href=%22me@myserver.com)"\>My Email address\</a\>

I dont want it to say exactly that, i want it to say it as text with a link, i dont want to make the text filed html like that button does becuase it goes all white and i want the background like there would be on a text field,

Note: this text field is dynamic

:trout: :trout: :trout: :trout: :trout: :trout: :trout:

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [May 28, 2003, 3:32am UTC](https://forum.kirupa.com/t/loading-html-data-from-a-text-file/21919/2 "2003-05-28T03:32:43Z")

</div>

I’m not 100% about this but give it a go.

Change the **text** to **htmlText** like this:

[AS]Content.htmlText = this.start;[/AS] or render the dynamic text field as html with the property inspector with the \<\> button.

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [May 28, 2003, 10:19pm UTC](https://forum.kirupa.com/t/loading-html-data-from-a-text-file/21919/3 "2003-05-28T22:19:13Z")

</div>

the \<\> button is what i dont want to do becuase it gives it a whit backgroubd

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [May 28, 2003, 10:22pm UTC](https://forum.kirupa.com/t/loading-html-data-from-a-text-file/21919/4 "2003-05-28T22:22:03Z")

</div>

nermind, the \<\> workds, i must have b een thinking of a diffrent button

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [June 11, 2003, 5:21pm UTC](https://forum.kirupa.com/t/loading-html-data-from-a-text-file/21919/5 "2003-06-11T17:21:12Z")

</div>

your were thinking of the ‘show border around text’ box.

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [June 12, 2003, 2:28am UTC](https://forum.kirupa.com/t/loading-html-data-from-a-text-file/21919/6 "2003-06-12T02:28:53Z")

</div>

Oh…was going to post a new thread about this, but thanks for posting this, and thanks all for the info. 😃
