# Evaluating a text input field on button click

**URL:** <https://forum.kirupa.com/t/evaluating-a-text-input-field-on-button-click/270492>\
**Category:** Uncategorized\
**Created:** [September 10, 2008, 2:29pm UTC](https://forum.kirupa.com/t/evaluating-a-text-input-field-on-button-click/270492 "2008-09-10T14:29:28Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![ivanwright](https://yyz1.discourse-cdn.com/flex011/user_avatar/forum.kirupa.com/ivanwright/32/119_2.png) [@ivanwright](https://forum.kirupa.com/u/ivanwright)\
**Post date:** [September 10, 2008, 2:29pm UTC](https://forum.kirupa.com/t/evaluating-a-text-input-field-on-button-click/270492/1 "2008-09-10T14:29:28Z")

</div>

can anyone tell me why the following code wouldn’t be working? this is on a button, so that the input would be evaluated and a certain msg would appear when the button is clicked.

```auto

on (release) {
	if ((inputName = "this") || (inputName = "that")) {
		msg = "msg1";
	} else {
		msg = "msg2";
	}
}

```

help?
