Submit a form with Javascript

M

marco

Hi,

I have this problem : when I submit a Form with the usual
<html:form name="myForm" action="/myAction"
type="org.apache.struts.validator.DynaValidatorActionForm">

......
<input type="submit" name="action" value="Soumettre">
.....

</form>

everything goes well.
If I try to submit the form with this code changes to prevent "double
submit"

<script language="javascript">

function onClickEventSubmit(elemID)
{
elem = document.getElementById(elemID);
elem.disabled = true;
laForm = elem.form;
laForm.submit();
}

.....

<html:form name="myForm" action="/myAction"
type="org.apache.struts.validator.DynaValidatorActionForm">
....
<input type="button" id="test3" name="action" value="Soumettre"
onclick="onClickEventSubmit('test3')>
.....

</form>


I get the following error:
Request[/myAction] does not contain handler parameter named action

Note: I also tried
<input type="submit" id="test3" name="action" value="Soumettre"
onclick="onClickEventSubmit('test3')>

Any ideas?
Thanks
Marco
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,774
Messages
2,569,598
Members
45,149
Latest member
Vinay Kumar Nevatia0
Top