$('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
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
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"
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
>
>
4 matches
Mail list logo