View Single Post
Old 03-12-2013, 12:17 AM   PM User | #11
Old Pedant
Supreme Master coder!

 
Old Pedant's Avatar
 
Join Date: Feb 2009
Posts: 23,247
Thanks: 59
Thanked 3,998 Times in 3,967 Posts
Old Pedant is a name known to allOld Pedant is a name known to allOld Pedant is a name known to allOld Pedant is a name known to allOld Pedant is a name known to allOld Pedant is a name known to all
Sunfighter:

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.
__________________
An optimist sees the glass as half full.
A pessimist sees the glass as half empty.
A realist drinks it no matter how much there is.
Old Pedant is offline   Reply With Quote