I have two HTML select
boxes. I need to reset one select
box when I make a selection in another.
Use jquery for binding onchange event to select but you don't need to create another $(this)
jquery object.
$('select[name=name2]').change(function(){
if (this.value) {
console.log('option value = ', this.value);
console.log('option text = ', this.options[this.selectedIndex].text);
// Reset selected
this.selectedIndex = this.defaultSelected;
}
});