I'm kind of struggling to remember - I think it may be because when an option has no value the .text value is sent to the server instead. Perhaps the logic could be switched from an || to an elem.value ? ... do .value ... : ... do .text ...
I went ahead and did it: http://dev.jquery.com/ticket/4962 http://dev.jquery.com/changeset/6485 And it passes in all browsers - so yay! --John On Thu, Jul 23, 2009 at 5:35 PM, Julian Aubourg <aubourg.jul...@gmail.com>wrote: > Well, you could very well imagine a site with a guy using 666 or 69 or any > other l337 name as his username. If you happen to have a select with a list > of users (friends list for instance), with option values being the user id, > you can end up with Mr. 69 being confused with user which id is 69. > A workaround would be to add a character that is not authorized in a > username concatenated before the ids for the select value but that's quite > messy imo. > > On a side note, I'm quite curious to know what the reasonning behind > testing the text node against a test *value* was. > > Oh, and John, you're on fire today, my gmail box is burning because of you > ! ;) > > 2009/7/23 John Resig <jere...@gmail.com> > > >> Grouping without optgroup. >>> In a (big) select you could have many generic options like "select an >>> option", or just "-----", each with a specific value. By selecting one, the >>> user is given a starting position, closer to the options she might need. >>> >> >> Sure, that's reasonable - but I can't imagine anyone doing: >> >> <option value ="-----">BLAH</option> >> <option value="BLAH">------</option> >> >> --John >> >> >> > > > > --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "jQuery Development" group. To post to this group, send email to jquery-dev@googlegroups.com To unsubscribe from this group, send email to jquery-dev+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/jquery-dev?hl=en -~----------~----~----~----~------~----~------~--~---