Reputation: 31313
It seems Chrome ignores forms that are embedded inside another form.
See this fiddle (http://jsfiddle.net/jeljeljel/NbUeQ/1/)
HTML
<form>
<div id="dialog">
<form id="theForm">
<label>abc</label>
</form>
</div>
</form>
JS
alert($('#theForm').length);
Note 'theForm' is not found.
Is the only solution to not have embedded forms?
Upvotes: 4
Views: 53
Reputation: 4290
Yes.
The only solutions is not to embedded forms as this is not valid HTML.
See the W3C XHTML spec's Element Prohibitions section at http://www.w3.org/TR/xhtml1/#prohibitions
Upvotes: 3