Bug Tracker

Opened 12 years ago

Closed 12 years ago

Last modified 12 years ago

#6894 closed bug (invalid)

Can not select first nested form.

Reported by: joeygreen Owned by:
Priority: Milestone: 1.4.3
Component: selector Version: 1.4.2
Keywords: selector, form, nested Cc:
Blocked by: Blocking:


I realize that nesting forms in HTML is incorrect but also know that a lot of developers do this for ajax form submission that utilizes the jQuery.Serialize() function among other things.

it appears that jQuery will not select the first nested form element but will select all subsequent form elements nested within a parent form tag.

My current workaround is create a dummy form to place in the first position in order to select my intended form via any jQuery selector.

Change History (3)

comment:1 Changed 12 years ago by dmethvin

Resolution: invalid
Status: newclosed

Since nested forms are invalid and the browser isn't obligated to do anything predictable with invalid html, it's unlikely jQuery can fix this. It's not clear from your description what the browser (Firefox? IE? Chrome? Safari?) is doing with the invalid markup, but it may be removing the nested form tag. Try creating a test case.

comment:2 Changed 12 years ago by Rick Waldron

#8086 is a duplicate of this ticket.

comment:3 Changed 12 years ago by Rick Waldron

#9416 is a duplicate of this ticket.

Note: See TracTickets for help on using tickets.