Questions tagged [double-submit-prevention]

49 questions
183
votes
24 answers

Prevent double submission of forms in jQuery

I have a form that takes a little while for the server to process. I need to ensure that the user waits and does not attempt to resubmit the form by clicking the button again. I tried using the following jQuery code:
Adam
  • 43,763
  • 16
  • 104
  • 144
34
votes
9 answers

How to do double-click prevention in JSF

We have a few search pages that run against a lot of data and take a while to complete. When a user clicks on the search button, we'd like to not allow them to submit the search result a second time. Is there a best practice for doing…
BestPractices
  • 12,738
  • 29
  • 96
  • 140
26
votes
13 answers

How do I stop the Back and Refresh buttons from resubmitting my form?

I am doing web development. I have a page to do with credit card, which when user click "refresh" or "Back", the transaction will be performed one more time, which is unwanted. This include Browser top left "Back" & "Refresh" button, "right…
sytee
26
votes
7 answers

Solving the Double Submission Issue

I would like to see how Web Developers avoid the double submission problem. So basically my understanding of the problem is as follows: Double submission occurs when an impatient user submits a form multiple times, causing issues. This problem can…
JHarley1
  • 2,026
  • 6
  • 24
  • 34
17
votes
9 answers

ASP.NET MVC - How to prevent double click submit with jquery.validate.unobtrusive lib?

I need to avoid the double click submitting behavior. I'm using the client validation with the unobtrusive library. I have the following code for avoiding the double clic: jQuery.fn.preventDoubleSubmit = function () { var alreadySubmitted =…
Rodrigo Caballero
  • 1,090
  • 1
  • 15
  • 27
14
votes
3 answers

Pure Java/JSF implementation for double submit prevention

We're using JSF 2.0 on WebSphere v8.5 with several component libraries PrimeFaces 4.0, Tomahawk 2.0, RichFaces, etc. I am looking for generic mechanism to avoid form re-submission when the page is refreshed, or when the submit button is clicked once…
Sarz
  • 1,970
  • 4
  • 23
  • 43
11
votes
2 answers

ajax - Prevent double click on submit

How can I prevent the user from double clicking submit button on my signup form which is an ajax partial view? I regret to ask since this would have already been asked. I just can't find a clear working answer now matter where I search. Disabling…
Valamas
  • 24,169
  • 25
  • 107
  • 177
10
votes
11 answers

Why doesn't my form post when I disable the submit button to prevent double clicking?

Like every other web developer on the planet, I have an issue with users double clicking the submit button on my forms. My understanding is that the conventional way to handle this issue, is to disable the button immediately after the first click,…
John MacIntyre
  • 12,910
  • 13
  • 67
  • 106
9
votes
3 answers

Are there techniques to prevent double submissions in stateless web applications?

I want to implement double submission prevention in an existing java web application (struts actually). Architecture wise we are talking about 2 to N possible application servers (tomcat) and one single database server (mysql). The individual…
8
votes
5 answers

javascript/jquery disable submit button on click, prevent double submitting

So I have the submit button that looks like this: When I double click it double submits…
inrob
  • 4,969
  • 11
  • 38
  • 51
6
votes
1 answer

Preventing double form submissions

Exact Duplicate: How to handle multiple submissions server-side The general task at hand: preventing a double form submission in a multi-user web based application. Think financial transactions. I have two methods which can be used in…
Krystian Cybulski
  • 10,789
  • 12
  • 67
  • 98
5
votes
2 answers

How to prevent DoubleSubmit in a GWT application?

To clarify what double submit is: When the user clicks on a submit button twice, the server will process the same POST data twice. To avoid this (apart from disabling the button after a single submit), most web frameworks like Struts provide a token…
Vidhya
  • 51
  • 1
  • 3
5
votes
2 answers

Does ASP.NET Web Forms prevent a double click submission?

I'm working on an ASP.NET 4.0 Web Forms project, after a break of about 5 years, and I'm confused about the submit behaviour. In the click event of a button, I sleep the thread so that I can click the submit button multiple times. From what I can…
Jules
  • 4,319
  • 3
  • 44
  • 72
4
votes
1 answer

Post-Redirect-Get (PRG) Summary Page on Submit

So I read up on this method called PRG as a way of addressing the form double-submit issue. However, I have yet to find a descent implementation of the Summary Page / Success Message displayed to the user. The only way I can think of is storing a…
Chiramisu
  • 4,687
  • 7
  • 47
  • 77
4
votes
2 answers

duplicate data insert in CodeIgniter

I am just inserting data in codeigniter controller part at pastebin http://pastebin.com/KBtqrAkZ public function add_product() { $this->lang->load('log_in', 'english'); log_in_check($this->lang->line('log_in_authentication_error'),…
1
2 3 4