# Input box

**URL:** <https://forum.kirupa.com/t/input-box/62466>\
**Category:** Uncategorized\
**Created:** [August 28, 2004, 1:40am UTC](https://forum.kirupa.com/t/input-box/62466 "2004-08-28T01:40:32Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![pickkill](https://avatars.discourse-cdn.com/v4/letter/p/6a8cbe/32.png) [@pickkill](https://forum.kirupa.com/u/pickkill)\
**Post date:** [August 28, 2004, 1:40am UTC](https://forum.kirupa.com/t/input-box/62466/1 "2004-08-28T01:40:32Z")

</div>

on(release) {  
loadText = new loadVars();  
loadText.load(“mailing.txt”);  
//creating the loadVarsText function  
loadText.onLoad = function() {  
mailing.text = this.input;  
}  
};

just wondering what is wrong with this. i am trying to have it so that when you click this button. (submit) it will load the text that is in mailing.txt and desplay it in the input box. any suggestions. i cant get it to work. thanks for your help

---

<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:** [August 28, 2004, 3:26am UTC](https://forum.kirupa.com/t/input-box/62466/2 "2004-08-28T03:26:23Z")

</div>

Firstly it should be **LoadVars** note the case. Another thing is it is generally a good idea to put the load call after you define the onLoad handler. This way if the file loaded immediately it would still find the onLoad handler defined.

```auto

on (release) {
	loadText = new LoadVars ();
	loadText.onLoad = function (bSuccess) {
		if (bSuccess) {
			mailing.text = this.input;
		};
	};

	loadText.load ("mailing.txt");
};

```
