Hi, I've got a problem with submitting forms via javascript. I've got a page
with multiple forms created using <logic:iterate> I want submit these forms
using a link as opposed to a submit button. However the forms all have the
same name so <html:link href="javascript: document.myForm.submit()" doesn't
work. It would appear that what I need is an "indexed" attribute on the
html:form tag.

This would mean that instead of rendering:

<form name="myForm">...</form>
<form name="myForm">...</form>
<form name="myForm">...</form>

I would get something like:

<form name="myForm1">...</form>
<form name="myForm2">...</form>
<form name="myForm3">...</form>

I could then construct the javascript to submit each form from the index,
e.g.

<html:form action="myAction">... <html:link page="<%= "javascript:
document.myForm" + myIndex + ".submit()" %>"/></html:form>

Can anyone comment on whether this would be the best way to do it? Is there
another way to easily refer to the correct form in javascript?

I would appreciate any help.
Thanks,
Matt


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

Reply via email to