# Comparing equality of vars

**URL:** <https://forum.kirupa.com/t/comparing-equality-of-vars/37226>\
**Category:** flash\
**Created:** [December 7, 2003, 3:38pm UTC](https://forum.kirupa.com/t/comparing-equality-of-vars/37226 "2003-12-07T15:38:59Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![mindfriction](https://yyz1.discourse-cdn.com/flex011/user_avatar/forum.kirupa.com/mindfriction/32/172_2.png) [@mindfriction](https://forum.kirupa.com/u/mindfriction)\
**Post date:** [December 7, 2003, 3:38pm UTC](https://forum.kirupa.com/t/comparing-equality-of-vars/37226/1 "2003-12-07T15:38:59Z")

</div>

Hmm this is really odd. Im trying to create a ‘simple’ check statement for a textbox of type input. I used the following to check whether the user has entered something in the textbox

```auto

if(subject =="" || message =="")
{
       trace("please enter something");            
}

```

Simple eh ? well unfortunately if the user hits the space key in both these text boxes this statement validates false ! :(…  
What am I doing wrong !? lol, I even tried

```auto

if(subject ==null || message ==null)
{
       trace("please enter something");            
}

```

and i get same problem…such a noob question I know
