# Running function

**URL:** https://forum.kirupa.com/t/running-function/292589
**Category:** Uncategorized
**Created:** [July 16, 2009, 5:05am UTC](https://forum.kirupa.com/t/running-function/292589 "2009-07-16T05:05:50Z")
**Posts on this page:** 1
**Page:** 1

<div class="post-metadata">

### Author: ![dilpreet](https://avatars.discourse-cdn.com/v4/letter/d/51bf81/32.png) [@dilpreet](https://forum.kirupa.com/u/dilpreet)
#### Post date: [July 16, 2009, 5:05am UTC](https://forum.kirupa.com/t/running-function/292589/1 "2009-07-16T05:05:50Z")

</div>

Hey guys

How do i get function to run again and again. I have this thing where i want to check 5 textfields if they have any text in them.

I made a function

```php
function test(){
if(q_txt.text == "" && a1_txt.text == "" && a2_txt.text == "" && a3_txt.text == "" && a4_txt.text == "" )
    {    
        compile_btn.visible = true;
        compile = true;
    }
    else
    {
        compile_btn.visible = false;
        compile = false;
    }
}
test();

```

but this function only runs once and once it’s run if i type in any thing in the text field it doesn’t do anything.

How do i get it to check again and again
