# If... else if question

**URL:** <https://forum.kirupa.com/t/if-else-if-question/136982>\
**Category:** Uncategorized\
**Created:** [February 10, 2005, 12:33am UTC](https://forum.kirupa.com/t/if-else-if-question/136982 "2005-02-10T00:33:54Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![beneath\_the\_sky](https://yyz1.discourse-cdn.com/flex011/user_avatar/forum.kirupa.com/beneath_the_sky/32/506_2.png) [@beneath\_the\_sky](https://forum.kirupa.com/u/beneath_the_sky)\
**Post date:** [February 10, 2005, 12:33am UTC](https://forum.kirupa.com/t/if-else-if-question/136982/1 "2005-02-10T00:33:54Z")

</div>

I want to have some text display if my external text file doesn’t load right away but I’m not sure how to go about that. I was thinking this code may work?? Any help would be great 🙂

```auto
loadText = [color=#000084]new[/color] [color=#000084]loadVars[/color]();
loadText.[color=#000084]load[/color]("[color=#0000ff]your_txt.txt[/color]");
loadText.[color=#000084]onLoad[/color] = [color=#000084]function[/color](success) {
		[color=#000084]if[/color] (success) {
				textBox.[color=#000084]html[/color] = [color=#000084]true[/color];
				textBox.[color=#000084]htmlText[/color] = [color=#000084]this[/color].myNews;
		}
		[color=#000084]else[/color] [color=#000084]if[/color] (another condition) {
				textBox.[color=#000084]text[/color] = "[color=#0000ff]Loading text...[/color]";
		}
		[color=#000084]else[/color] {
				textBox.[color=#000084]text[/color] = "[color=#0000ff]Text failed to load[/color]";
		}
};

```
