I have several forms loaded via AJAX so to avoid nested forms I want to use some select and checkbox selectors here and there to trigger some jquery actions but not inside a form element. Something like:
<div>
[select] [checkbox]
[form via ajax][/form]
[select] [checkbox]
[form via ajax][/form]
[select] [checkbox]
</div>
Seems work well in firefox and chrome but is it really a legal practice? THX.-
Assuming I’ve understood your question correctly, it’s completely fine to have form controls outside of a
<form>tag. The HTML 4.01 spec states this:However, form controls outside of a
formtag are not what the spec calls “successful controls”, which means they cannot be submitted along with a form (fairly obviously).The section of the spec on intrinsic events goes on to state the following:
That seems to be pretty much exactly the sort of thing you’re doing, so yes, it’s completely valid to do it.