# IF functions don't work with XML?

**URL:** <https://forum.kirupa.com/t/if-functions-dont-work-with-xml/254018>\
**Category:** flash\
**Created:** [March 7, 2008, 9:51am UTC](https://forum.kirupa.com/t/if-functions-dont-work-with-xml/254018 "2008-03-07T09:51:32Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![your\_syndrome](https://avatars.discourse-cdn.com/v4/letter/y/f04885/32.png) [@your\_syndrome](https://forum.kirupa.com/u/your_syndrome)\
**Post date:** [March 7, 2008, 9:51am UTC](https://forum.kirupa.com/t/if-functions-dont-work-with-xml/254018/1 "2008-03-07T09:51:32Z")

</div>

Hi,

I’m bringing certain words into a dynamic text box through XML.

So when you click on IMG1 it displays ''Caption 1" in the dynamic text box.  
IMG2 displays “Caption 2” etc…

I thought it would be fairly easy to right an IF function so that when the dynamic text box says ''Caption 1" it will then perform a trace to show that it works.

The dynamic text box has instance name of “contentPull” and var name of “inputText”

```php

if (inputText == "Caption 1"){
      trace("it worked");
}
 
if (inputText == "Caption 2"){
      trace("it worked 2");
}

```

Any help? :beam:
