I am using struts(Jakarta's) framework, when I click on a link from one jsp, the form is getting submitted multiple times. I am using only one form, and only one javascript method to submit that form. Is there any way to fix that problem?
Created May 7, 2012
Alvaro Acero Christopher said:
Do you mean that one click of your button actually submits the form multiple times? indicating a bug in your javascript maybe (see FAQ's)
Maybe you have an this code in your jsp:
Or, do you mean you want to guard, on the server side, against a user inadvertently clicking the button multiple times, thereby submitting the form multiple times, e.g. use a server-side token?
Here I totally agree with Christopher... if the problem is just the first one, you should use this solution anyway!
Cya!
Do you mean that one click of your button actually submits the form multiple times? indicating a bug in your javascript maybe (see FAQ's)
Maybe you have an this code in your jsp:
<input type="submit" ...>and in the javascript you have
document.forms[0].submit()
this makes the form get submitted two times!!!
Or, do you mean you want to guard, on the server side, against a user inadvertently clicking the button multiple times, thereby submitting the form multiple times, e.g. use a server-side token?
Here I totally agree with Christopher... if the problem is just the first one, you should use this solution anyway!
Cya!