Great. Thanks. lso is it possible to select an element based on the
value it has.

I have an button like <input type="button" value="GO" />

I want to attach an event to this button. How can I..?

On Dec 9, 3:16 pm, "Karl Rudd" <[EMAIL PROTECTED]> wrote:
> Heh yeah that too. :) Sorry I missed that detail.
>
> Karl Rudd
>
> On Tue, Dec 9, 2008 at 9:08 PM, Rik Lomas <[EMAIL PROTECTED]> wrote:
>
> > It could be to do with the select isn't an input tag, it's a select
> > tag, try $("select[name='myselect'] option:selected").val(); instead
>
> > Rik
>
> > 2008/12/9 Karl Rudd <[EMAIL PROTECTED]>:
>
> >> The SELECT's value is what you want:
>
> >>    $("input[name='myselect']").val()
>
> >> The only time you need to check is individual OPTIONs are selected is
> >> if you have a multi-select list box.
>
> >> Karl Rudd
>
> >> On Tue, Dec 9, 2008 at 8:09 PM, JQueryProgrammer
> >> <[EMAIL PROTECTED]> wrote:
>
> >>> $("input[name='myselect'] option:selected").val(); is not working. It
> >>> gives undefined. Can anyone please help.
>
> > --
> > Rik Lomas
> >http://rikrikrik.com

Reply via email to