I tried that, but it didn't work for me. I'm new to jQuery, so maybe I'm doing something silly, but here's what I had:
alert($('select[value="ext"]').size()); This shows 0, when there is one menu with "ext" as the value. If I remove the value expression and just use 'select', I get 9 as the output, which is correct as there are nine menus on the page. Any ideas? Thanks, Anthony On Apr 19, 10:40 am, mkmanning <michaell...@gmail.com> wrote: > $('select[value=yes]') should return all of the select menus with > 'yes' as the chosen option. > > On Apr 19, 2:42 am, ajc <acuc...@gmail.com> wrote: > > > I am trying to figure out how to select all the menu items that have a > > particular value in a form. For example, let's say you had a form with > > 10 different yes/no menus, and you wanted to select all of the ones > > that are currently set to "yes". Is there a way to do that? I tried > > doing something like: > > > $("option[value='yes'][selected='true']) > > > That seemed to always return zero results. If I leave out the > > 'selected' attribute in the expression, it returns the correct number > > of elements (10 in this example). But that is the total number of > > menus with a 'yes' option, whether or not they are selected. > > > Any ideas on how I can do this? > > > Thanks, > > Anthony