# The External Variable issue

**URL:** https://forum.kirupa.com/t/the-external-variable-issue/221444
**Category:** Uncategorized
**Created:** [April 4, 2007, 12:00pm UTC](https://forum.kirupa.com/t/the-external-variable-issue/221444 "2007-04-04T12:00:45Z")
**Posts on this page:** 1
**Page:** 1

<div class="post-metadata">

### Author: ![fifty](https://avatars.discourse-cdn.com/v4/letter/f/cab0a1/32.png) [@fifty](https://forum.kirupa.com/u/fifty)
#### Post date: [April 4, 2007, 12:00pm UTC](https://forum.kirupa.com/t/the-external-variable-issue/221444/1 "2007-04-04T12:00:45Z")

</div>

hello all… I know that there is quite a lot of external loading discussion going on… but I cannot seem to find a solution to my problem.

I can load an external txt file, and I can get the many variables from it… but, what I want to do is load ONE text document and have the multiple variables populate ONE text field dynamically based on the users choice. The best example I can give is a photo gallery where there is a title of the photo gallery.

I do not want to use XML (yet) but had wanted to understand how to request a changing variable rather than specify exactly which variable I want…  
so rather than saying load “variable1” I want to say load “whatVariable” and then define “whatVariable” I want outside of the actual text file loading script.

do I make any sense? probably not… my appologies…maybe this helps:

loadText = new LoadVars();  
loadText.load(“infoPacs/” + \_root.Section + “.txt”);  
loadText.onLoad = function() {  
DETAILS.htmlText = this.variable1;  
}

-note: the text file is loading great… and loads a different text file based on which section the user is in.  
Meanwhile… the loading of the single variable also works… but I want to make it dynamic the way the actual text file load is dynamic.

any help would be great.
