Is it possible to nest html forms? Like so:
<form name="mainForm">
<form name="subForm">
</form>
</form>
So that both forms work? My friend is having problems with this, part of the subForm works, while part of it does not.
Thanks
Is it possible to nest html forms? Like so:
<form name="mainForm">
<form name="subForm">
</form>
</form>
So that both forms work? My friend is having problems with this, part of the subForm works, while part of it does not.
Thanks
In a word, no. You can have several forms in a page but they should not be nested.
As Craig said, no.
But, regarding your comment as to why:
It might be easier to use 1 <form>
with the inputs and the "Update" button, and use copy hidden inputs with the "Submit Order" button in a another <form>
.
Even if you could get it to work in one browser, there's no guarantee that it would work the same in all browsers. So while you might be able to get it to work some of the time, you certainly wouldn't be able to get it to work all of the time.
You would even have problems making it work in different versions of the same browser...so avoid using that
Of Course You Can! The reason that it is not advisable is that when ever you hit submit you automatically take your self to the action="" Destroying all of the information that your client has entered into the other areas of the form.
So how can you nest forms?
By making your subforms process in a blank window! Just use target="_blank" in the form element!