*** Specification ***
I don't believe the specification allows nested forms (but I could be wrong)
http://www.w3.org/TR/html401/

I searched for a few minutes but couldn't find anything that disallowed it.


*** Prep ***
In preparing for this response for you, I threw together some code for
testing my hypotho-guess ;)
I modified a jsp in the struts-example and noticed a few things........

tried it this way ----------
<html:form action="/saveRegistration">

 <html:form action="/runme0">
 </html:form>

 <html:form action="/runme1">
 </html:form>

 <html:form action="/runme2">
 </html:form>

 <html:submit>
    <bean:message key="button.save"/>
 </html:submit>

</html:form>


and this way ----------
<html:form action="/saveRegistration">

 <html:form action="/runme0">
 </html:form>

 <html:form action="/runme1">
 </html:form>

 <html:form action="/runme2">
  <html:submit>
     <bean:message key="button.save"/>
  </html:submit>
 </html:form>

</html:form>


*** Results ***
The nested forms will not submit with html inputs (type="submit")
However, you can submit them with script (similar to what you put)

I used a hyperlink as such:

<html:link href="JavaScript:doSubmit(0);">submit form 0</html:link><br>
<html:link href="JavaScript:doSubmit(1);">submit form 1</html:link><br>
<html:link href="JavaScript:doSubmit(2);">submit form 2</html:link><br>

<script language="JavaScript">
function doSubmit(indx){
    document.forms[indx].submit();
}
</script>



*** Question ***
Why would you want to nest forms anyway?


JM





> -----Original Message-----
> From: Bjorn Blum [mailto:[EMAIL PROTECTED]]
> Sent: Sunday, May 05, 2002 1:43 PM
> To: Struts Users Mailing List
> Subject: Q: nested <html:form> - Tags
>
>
> Hello out there,
>
> I've got a urgent question to you. Is it possible to handle nested form -
> tags with struts or html?
> e.g.
> <form 1>
>     <form 2>
>     </form 2>
>     <form 3>
>     </form 3>
> </form1>
>
> And can I "speak" to them, as they were standalone? in Javascript like
> 'document.forms[2].submit()' or so.
>
> Many thanx for your help.
>
> bjoern
>
> --
> GMX - Die Kommunikationsplattform im Internet.
> http://www.gmx.net
>
>
> --
> To unsubscribe, e-mail:
> <mailto:[EMAIL PROTECTED]>
> For additional commands, e-mail:
> <mailto:[EMAIL PROTECTED]>
>
>


--
To unsubscribe, e-mail:   <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>

Reply via email to