[jQuery] Re: newbie: how can I get the # of options in a SELECT element?

2007-09-12 Thread David Duymelinck
Yes of course i was presuming there was only one select, which makes my example correct, but in a real life site you have to use an id . -- David Sam Collett schreef: That gets all options in all selects, this would be better: $('#mySelectElement option').length On Sep 12, 1:14 pm, David D

[jQuery] Re: newbie: how can I get the # of options in a SELECT element?

2007-09-12 Thread Sam Collett
That gets all options in all selects, this would be better: $('#mySelectElement option').length On Sep 12, 1:14 pm, David Duymelinck <[EMAIL PROTECTED]> wrote: > $('select option').length should do it. > > -- david > > Ojas schreef: > > > Using jQuery, how can I get the following value? > > > do

[jQuery] Re: newbie: how can I get the # of options in a SELECT element?

2007-09-12 Thread David Duymelinck
$('select option').length should do it. -- david Ojas schreef: Using jQuery, how can I get the following value? document.myForm.mySelectElement.options.length -- David Duymelinck [EMAIL PROTECTED]