View Single Post
Old 03-12-2013, 07:42 PM   PM User | #15
Old Pedant
Supreme Master coder!

 
Old Pedant's Avatar
 
Join Date: Feb 2009
Posts: 23,579
Thanks: 62
Thanked 4,064 Times in 4,033 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
Actually, seeing the difference between our two is instructive, I think. We were, indeed, almost the same. But knowing that you can either set the <option> to selected or set the selectedIndex to match the desired <option> is good to have in your coding arsenal. (And knowing that you must use selected if you want to set multiple <option>s in a <select multiple> is also good to know. And and and.. The more you know, the better.)
__________________
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