thanks to everyone that reply and read my mail.  I changed my input
statement and it works.
<input type="image" name="submit" src="images/search.gif" value="Submit"
onClick="transmitMessage('Submit Order')">

I'm amaze that there are many generous developers out there.  I feel honor
to be on this mailing list!
Lunch is on me, the usual place!  

Struts Forever
-----Original Message-----
From: Peter Alfors [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, June 13, 2001 7:49 AM
To: [EMAIL PROTECTED]
Subject: Re: javascript multiple submit


Looks like javascript does not know the name of your form.
I have not used the html:form tag before, but from looking at the code, it
does
not look like having the form named in your
xml document is going to set the form name.  The html:form tag takes an
attribute 'name' that you could set:

<html:form name="orderRegularForm" action="workOrderRegular">

or you could change your javascript to access the form as an index value
such
as:

  document.forms[0].action = "/dgonline/workOrderSubmit.do";
  document.forms[0].submit();

where 0 = first form defined on your page.

HTH,
    Pete

Kiet Nguyen wrote:

> I'm trying to use javascript to submit a form.  The javascrip function get
> called, but the form is not submited (i.e. the ActionClass doesn't
execute)
> Here is my jsp.
>
> .....
> <script language="JavaScript">
> function transmitMessage(msgAction) {
>         document.orderRegularForm.action = "/dgonline/workOrderSubmit.do";
>         document.orderRegularForm.submit(document.orderRegularForm);
> }
> .............
> <html:form action="workOrderRegular">
>  <a href="#"><img src="images/submit.gif"
onClick="transmitMessage('Submit
> Order')"></a>
> </htm:form>
>
> ===My config.xml file
>     <action    path="/workOrderSubmit"
>
> type="com.dgsystems.dgonline.struts.order.OrderRegularSubmitAction"
>                name="orderRegularForm">
>     </action>

Reply via email to