struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Adam Lipscombe" <>
Subject NEWBIE: how to submit a named html:form via javascript
Date Fri, 25 Jun 2004 17:26:37 GMT


I want to submit a named html:form. e.g.

<html:form name="helpForm" action="/help" method="POST">
   <map name="Map">
      <area shape="rect" coords="2,0,50,13" href=""
onclick="javascript:document.helpForm.submit()" >

Wit the above construct Struts complains that the form requires a "type"
attribute - it seems to want me to specify the classname of the ActionForm
as the "type".

My understanding is that Struts deduces the ActionForm to use automatically
from the struts-config action definition. Is this correct?

I know I could use "javascript:document.forms[n].submit()" but I would
prefer to submit the named form so that if further forms are added to the
page it does not mess up the submit.

Is this possible? How?

TIA - Adam

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message