Originally Posted by Old Pedant
Aside from the fact that you keep repeating the code
document.getElementById("attop38") instead of assigning it once to a local variable, how is that different that the code I showed?
Oh...wait...I see...You set the <option>'s selected property to true whereas I changed the selectedIndex. So long as the <select> is not set to muliple, though, those are equivalent.
Sorry. Didn't read your code. When I got back to this thread it had a lot of posts that just looked above esthera's knowledge of js so just gave him code. Had I read it I would have said :
Esthera, use Old Pedant's code in post #7.
And yes we both had the same code. How often does that happen?