Be carreful, submiting your forms this way you will submit N request,
and only the last one will get a response. If others one have
validation or processing errors, you will not get them.

I would suggest you to set a new form with hidden fields, and
javascript to copy values. On submit, submit the hidden form :

<form name="copy" action="...">
  <input type="hidden" name="name1">
  <input type="hidden" name="nameN">
</form>

<form name="form1">
<input type="text"
       onchange="document.forms.copy.name1.value=this.value">
</form>

<form name="formN">
<input type="text"
       onchange="document.forms.copy.nameN.value=this.value">
</form>

This code can be easily built with some <logic:iterate>

Nico.

> [FYI]
> <!--
> <script language="JavaScript">
>     function SubmitAll() {
>         document.form1.submit();
>         document.form2.submit();
>         ....
>         document.formN.submit();
>     }
> </script>
> <form name="form1" ..../>
> <form name="form2" .... />
> ....
> <form name="formN" .... />
> <input type="button" value="Submit" canClick="SubmitAll()" />
> -->
>
> HOWEVER
> In struts-config the following action is required:
>
> <action path="/formprocess"
>         name="form1"
>         scope="request"
>         validate="true"
>         type="com.test.action.FormProcessAction">
>     <forward name="success" path="/StrutsCXServlet"/>
>     <forward name="error" path="/idiot.do"/>
> </action>
>
> The question is, can a regexp be used to group all of the forms
under the
> one action (Such as name="form[1-9]")??  All the form names are
dynamically
> created, and unknown to struts before posting.  Is there a way
struts can
> handle this sort of form posting?
>
> Kind regards,
>
> Simon
>
>
> --------------------------------------------------------------------
-
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]


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

Reply via email to