As topcoder said. ID in the html dom is used to identify one unique object, that’s the whole reason to use ID. Use class if you want to apply something to multiple elements.
GET is default in forms so no reason to send it in. It is also default to submit to the same URL you’re on, so if indexbody is the current page then action can be left out as well.
First of all I added “this” to the onchange function call, so that we can get the form element that calls the function. We need this in order to know which form field has the new value.
Then we get the selected field, like you did before
Then we get all other fields with the class amount
Lastly we loop through all those other fields and set their “selectedIndex” to the selected fields