[jQuery] Re: select option name attribute

2008-07-01 Thread Happy
$('select[name=textselector] option:selected').attr('name') On Jun 25, 7:07 pm, chasryder <[EMAIL PROTECTED]> wrote: > How do I retrieve the name attribute of a selectedoptionusing jquery. > > IE: > > > Text > Text 2 > > > In this example, I would be trying to get 12 when the "Text"optionis > s

[jQuery] Re: Select option name attribute

2008-06-26 Thread andrea varnier
On 26 Giu, 05:08, Brad <[EMAIL PROTECTED]> wrote: > Your options should have "value" attributes and not "name". > > > Text > Text 2 > > > Try something like > > $("textselector option:selected").val(); This works, but since the selected option is the actual value of the , I would do something l

[jQuery] Re: Select option name attribute

2008-06-25 Thread RobG
On Jun 26, 1:08 pm, Brad <[EMAIL PROTECTED]> wrote: > On Jun 25, 6:03 pm, Chas <[EMAIL PROTECTED]> wrote: > > > How do I retrieve the name attribute of a selected option using > > jquery. > > > IE: > > > > > Text > > Text 2 > > > > > In this example, I would be trying to get 12 when the "Text"

[jQuery] Re: Select option name attribute

2008-06-25 Thread Brad
Your options should have "value" attributes and not "name". Text Text 2 Try something like $("textselectoroption:selected").val(); On Jun 25, 6:03 pm, Chas <[EMAIL PROTECTED]> wrote: > How do I retrieve the name attribute of a selected option using > jquery. > > IE: > > > Text > Text 2 > >