Prevent specific selection combintaions in listboxes on the web

The code below inserted into the onChange event will prevent users from selecting unacceptable combinations.
JavaScript


for (var i=0;i<this.options.length;i++) {
  if (this.options[i].value == 'Any' && this.options[i].selected == true )
     this.value = 'Any';
  }
}

Images/Screenshots:

Posted by fbrefere001 on Wednesday May 5, 2004