Julian explained the scenario quite well, although my exact case deals
with room reservations with a nasty select box.  The user can be
undecided about rooms altogether or just about exactly which
conference room (which is a type of room in this case).  I worked
around it by giving the top "Undecided" the value of "Undecided Room"
and using that for val() instead.

Glad to see it was sorted out!  I'm sorry I couldn't have been of more
help earlier.  I'm not a mailing list kinda person.

On Jul 23, 5:38 pm, John Resig <[email protected]> wrote:
> 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/4962http://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 
> <[email protected]>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 <[email protected]>
>
> >>  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 [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/jquery-dev?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to