Two Laptop Bag
The moose likes HTML, CSS and JavaScript and the fly likes Mutiple form submission Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Engineering » HTML, CSS and JavaScript
Bookmark "Mutiple form submission" Watch "Mutiple form submission" New topic

Mutiple form submission

Subhadeep biswas

Joined: Apr 30, 2012
Posts: 14

i am unable to disable the button to avoid multiple form submission ..i have written code which is working on IE but neither on firefox nor on chrome

$(document).ready(function() {


$('#continueButton').attr("disabled", true);



<form:form method="post" action="${contextPath}/view/ActivationComponentController" modelAttribute="activationForm" id="personalInformation">

<button id="continueButton" type="submit" name="validateMsisdn" class="button sidePanel2 primaryButton">


Condition:- Spring form tag must be used
Button should be used.

Please help help help

Thanks in advance..
Eric Pascarello

Joined: Nov 08, 2001
Posts: 15385
Disabling a button has weird effects on forms, and one of those is the form may not submit. Some people like to hide the button instead of disabling it.

The real way to prevent multiple submissions is on the server and not on the client.


Bear Bibeault
Author and ninkuma

Joined: Jan 10, 2002
Posts: 63854

Eric is exactly right. Even if you have client-side guards to prevent this, you still need code not he server to detect and prevent this condition as you can never be certain that the client-side guards will be used.

[Asking smart questions] [About Bear] [Books by Bear]
I agree. Here's the link:
subject: Mutiple form submission
It's not a secret anymore!