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:
>
> > <select name="textselector">
> > <option name="11">Text</option>
> > <option name="12">Text 2</option>
> > </select>
>
> > In this example, I would be trying to get 12 when the "Text" option is
> > selected.

Did you mean when "Text 2" is selected?


> Your options should have "value" attributes and not "name".

Should?  The name attribute is valid for options, a value attribute is
not required.  I agree that it might be more appropriate for the OP to
use the value attribute instead of name, but that depends on what the
name attribute is being used for.


--
Rob

Reply via email to