# If statement problem

**URL:** https://forum.kirupa.com/t/if-statement-problem/223649
**Category:** Uncategorized
**Created:** [April 24, 2007, 5:05pm UTC](https://forum.kirupa.com/t/if-statement-problem/223649 "2007-04-24T17:05:57Z")
**Posts on this page:** 1
**Page:** 1

<div class="post-metadata">

### Author: ![iainharper](https://avatars.discourse-cdn.com/v4/letter/i/c77e96/32.png) [@iainharper](https://forum.kirupa.com/u/iainharper)
#### Post date: [April 24, 2007, 5:05pm UTC](https://forum.kirupa.com/t/if-statement-problem/223649/1 "2007-04-24T17:05:57Z")

</div>

OK, i have a text field and i have some script that detects what the text is then performs a function. Like this:

if (textfield == “some words”) {  
answer = " ‘some words’ found" ;  
}

Which is all fine, but i am going to need to make alot of these… so for each word typed in the text field a different function is performed. But i also want to write a statement that checks to see if the textfield is blank “” or if none of the words i have defined are in the text field to perform a standard function. For example: answer = “Not found”

Does anyone know how to format this? If so i would be EXTREMELY grateful.

Iain
