Question: I have this working in C#, but don't know where to go with Objective C (Xcode specifically).

I have 8 buttons

Stack1, Stack2, etc.

I want to choose Stack(variable) and change the image.

In C# I used 
Button Stacks = this.Controls["Stack" + StackNumber.ToString()] as Button;
Stacks.BackgroundImage = .....

Can I do this in Objective C also?

Answer: 
```
$('#submit').click(function(e) {
   var flag = true;
    $('select').each(function(){
     if($(this).val() == "select one"){
        alert("please select a value in " + $(this).attr("name"));
         flag = false;
     }
   });
    if(flag){
     alert('perfect');    
    }else{
      e.preventDefault();
    }
});

```

EXAMPLE : <http://jsfiddle.net/raj_er04/3kHVY/1/>

Quick note: If you want the alert to only show once rather than once per each 'select one', simply move the alert() into the else{ statement. thanks again for this answer!
You can do this with $.each():

```
$('#step_1').find('SELECT').each( function() {
    if( $(this).val() === 'select one' ) {
        alert('Please select yes or no!');
        return false;
    }
});

```

Note that returning false will prevent the loop from continuing once a missing field is found.