I’m trying to use JavaScript to validate a multiple select box is not empty. Below is the code I use on all the other input boxes (without [] in the field name).

```
<script type="text/javascript">
function validateForm()
{
var x=document.forms["escalations"]["SupportGroup[]"].value;
 if (x==null || x=="" || x=="---< Select Delivery Team >---")
   {
   alert("Please select a Support Group.");
   return false;
   }
}
</script>

```

And it works fine for single input but when I add the “[]” for multiple, it then alerts when an option is chosen or not. Any ideas? Thanks.

The html code is 

```
 <form name="escalations" onsubmit="return validateForm()" action="submitescalation.php?SM=SN" method="post" enctype="multipart/form-data">
 <select id="s0" multiple="multiple" name="SupportGroup[]" onchange="GetCompany();GetTitle();GetContact();" style="height: 25px">
 <option>Company1</option><option>Company2</option><option> Company3</option></select>
 </form>

```