How to select values of one select box based on the values in second select box

Hello,

I’ve got two select boxes with same options and same option values on my page, i want that whichever options a user selects from first box, should also get selected in second box. I need to get this done in Javascript or without using advance jquery methods.

Please suggest me is there a way to do this?

Thanks,
Kul.

Try the following:


document.getElementById('firstSelect').onchange = function () {
    document.getElementById('secondSelect').selectedValue = this.selectedValue;
};