# loadVars; Textbox; Button; Trace

**URL:** <https://forum.kirupa.com/t/loadvars-textbox-button-trace/13947>\
**Category:** flash\
**Created:** [February 20, 2003, 4:27am UTC](https://forum.kirupa.com/t/loadvars-textbox-button-trace/13947 "2003-02-20T04:27:02Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![waffe](https://avatars.discourse-cdn.com/v4/letter/w/c37758/32.png) [@waffe](https://forum.kirupa.com/u/waffe)\
**Post date:** [February 20, 2003, 4:27am UTC](https://forum.kirupa.com/t/loadvars-textbox-button-trace/13947/1 "2003-02-20T04:27:02Z")

</div>

I use loadVars like;

home = new LoadVars();  
homeURL = “home.txt”;  
home.load(homeURL);

Then I take part of the loadVars file and make it a varible;

home.onLoad = function(success) {  
if (success) {  
var text = eval(“this.text”);  
home\_txt = text;  
}

See the last line of code, this is the only time this code will populate my textbox with the text from my home.txt.

If I erase home\_txt = text; and put it in a button the listbox does  
not populate, and if I run a trace command on home\_txt it come out undefined.

So what am I doing wrong?

---

<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:** [February 20, 2003, 5:51am UTC](https://forum.kirupa.com/t/loadvars-textbox-button-trace/13947/2 "2003-02-20T05:51:30Z")

</div>

Change this line of code from;

var text = eval(“this.text”);

TO

text = eval(“this.text”);

and all is working.

By chance if anyone has some time on there hands, I would love to know why this is?
