Click to See Complete Forum and Search --> : Nesting forms


nuthead
01-15-2004, 07:35 AM
I am wanting to have a seperate form in the middle of another form, i cant think of any other way to do it as I'm using tables. Below is a diagram of what i mean:

|-------------|-------------|
| | |
| | |
| FORM 1 | FORM 2 |
| | |
| | |
|-------------|-------------|
| |
| FORM 1 CONTINUED |
| ... |
| ... |
| ... |
| ... |
| |
|---------------------------|

would the following work? (where the first submit button submits form 2)

<form name=form1 ...>
...
...
...
<form name=form2 ...>
...
...
...
<input type=submit>
</form>
...
...
...
<input type=submit>
</form>

Thanks in advance for any help!

hammerslane
01-15-2004, 07:42 AM
hi, sorry i don't have the answer, but i'm just interested as to why you need two forms on 1 page?
not saying you shouldn't, i'm just interested as to what you're doing really.

nuthead
01-15-2004, 08:30 AM
I'm writing a webmail script and I want it so the left hand side is for to/cc/Subject etc. and on the right it will list and deal with attachments (by means of a pop-up box that will be opened when form 2 is submitted), the main box below is for the body...

I think I'm going to have to think of a better way to do this but I can't be arsed! (plus i'm curious if the above would work)

soccer362001
01-15-2004, 09:03 AM
If I am recalling correctly it is impossible to nest forms.

Fang
01-15-2004, 09:23 AM
Nesting of forms is possible, but not advisable. In XHTML1 (http://www.w3.org/TR/xhtml1/#prohibitions) it is prohibited.

nuthead
01-15-2004, 09:30 AM
Cheers anyway, iv'e changed my mind now :)