# Conditions

**URL:** https://forum.kirupa.com/t/conditions/26789
**Category:** flash
**Created:** [July 26, 2003, 9:44am UTC](https://forum.kirupa.com/t/conditions/26789 "2003-07-26T09:44:05Z")
**Posts on this page:** 4
**Page:** 1

<div class="post-metadata">

### Author: ![bsprathapsimha](https://avatars.discourse-cdn.com/v4/letter/b/9de053/32.png) [@bsprathapsimha](https://forum.kirupa.com/u/bsprathapsimha)
#### Post date: [July 26, 2003, 9:44am UTC](https://forum.kirupa.com/t/conditions/26789/1 "2003-07-26T09:44:05Z")

</div>

hi,

can u please tell me what’s wrong in the below script:

enter.onRelease = function() {  
if (\_root.productcode.text == “mining” or “agriculture” or “industry” or “chemical”) {  
loadMovieNum(“test.swf”, 0);

```
} else {
	_root.productcode.text = "Enter the proper product code";
}

```

}

enter is the instance name of the button and product code is the instance name of the text field.

I am able to check with the only first condition, that is mining, when I enter agriculture or industry or chemical, its not checking the condition.

bye,  
prathap

---

<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: [July 26, 2003, 9:49am UTC](https://forum.kirupa.com/t/conditions/26789/2 "2003-07-26T09:49:33Z")

</div>

try if(\_root.productcode.text == “mining” || \_root.productcode.text == "agricukture || …etc…  
You can replace “||” with “or” \<-- no difference but the pont if that you have to put “\_root.productcode.text==” in front of every product code!

---

<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: [July 26, 2003, 9:58am UTC](https://forum.kirupa.com/t/conditions/26789/3 "2003-07-26T09:58:21Z")

</div>

hi

thank you for your reply.

I checked out all the possible ways, but everything in vain.  
I am not able to check whether it fullfills 2, 3, and 4th string is entered in text field.

bye,  
prathap

---

<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: [July 26, 2003, 9:59am UTC](https://forum.kirupa.com/t/conditions/26789/4 "2003-07-26T09:59:30Z")

</div>

[AS]enter.onRelease = function() {  
if (productcode.text == “mining” || productcode.text == “agriculture” || productcode.text == “industry” || productcode.text == “chemical”) {  
loadMovieNum(“sunlook.swf”, 0);  
} else {  
productcode.text = “Enter the proper product code”;  
}  
};[/AS]
