This will also work:
var formName = elem.form.name;
On 3/26/07, Brad Perkins <[EMAIL PROTECTED]> wrote:
> Solved. I had been trying parent() and not parents().
>
> parentformname = $(elem).parents("form").attr("name")
>
> -- Brad
>
> On 3/26/07, Brad Perkins wrote:
> > I have a form template that is shared among numerous forms. I need to
> > modify the ajax response content depending on the form used.
> >
> > When a button is clicked, what is the best way (w/ jQuery) to get the
> > name of the button's parent form?
>
> _______________________________________________
> jQuery mailing list
> [email protected]
> http://jquery.com/discuss/
>
_______________________________________________
jQuery mailing list
[email protected]
http://jquery.com/discuss/