form[name='formb'].  I don't know if the quotes are optional.  I doubt
it. the 'form' part of this syntax will always be the tag name, so
'forms' is not appropriate.

On Apr 24, 4:09 pm, funkyasl <amritas...@gmail.com> wrote:
> Hi all,
> I'm a jquery newbie. I've been searching around the web a lot, but
> could not find an answer.
>
> My page has multiple forms (forma, formb, formc, etc). I want to
> select one particular form, say formb, without assigning an id to it,
> just by its name itself. How can i achieve this?
> I've tried:
> $("forms[name=formb]")
> but it doesnt work.
>
> My actual motive is to get hold of a radio group in this form, so that
> i can assign a click event to it.
> Something like:
> $("forms[name=formb] myselect").click(function(){
>         alert("radio selected: " + this.value);});
>
> I have no idea how to do this. I'm sure there must be some way to do
> this without assigning ids to it.
>
> Please help me. Thanks in advance :)

Reply via email to