Solved

Getting multiple transaction postings

Posted on 1998-05-14
3
168 Views
Last Modified: 2013-12-25
Processing a cgi form in PERL, I am finding duplications (2x & 3x)  of the same record
appearing in the database. Believe the user holds the key down too long or perhaps
presses the submit key multiple times. How can I prevent these multiple transactions?
I'm a novice in PERL & do not know the C language equivalent to flushall(); could that
be the problem?
0
Comment
Question by:lshaffer
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
3 Comments
 
LVL 28

Accepted Solution

by:
sybe earned 70 total points
ID: 1828535
I don't think you can prevent it completely. What happens is when a user clicks on submit, the form data are send to your server, which then calls your perlscript. The sending takes time, depending on the speed of the connection and the amount of data send.

Then the script starts processing the data, which also takes some time, and when it is finished it sends the respons to the user.

Depending on how much data there is in the form, this can take a while, and the user will keep on seeing the form. Being impatient he might hit the submit button again, and send the data again.

One option to speed up the respons to the user is to send a first respons at the start of the perlscript, so before processing the data. But this might not be enough to prevent the user to get impatient.

So there is probably nothing left to do but make it easy to remove double transactions from the database.

If you use other, client side ways to make the form disappear when the user submits the form (for example using javascript) you  might miss some of the forms submitted as the data are lost in cyberspace.










0
 
LVL 6

Expert Comment

by:alamo
ID: 1828536
Another possibility is that your form is using the GET method rather than the POST method to submit its data. A GET form will be resubmitted with no warning to the user when it is accessed via a bookmark, reloaded, or even sometimes by pressing the BACK button. A POST form will warn the user before resubmitting. The user could still resubmit it if they want, but that would be rare- resubmissions as you describe are usually accidental.
0
 

Author Comment

by:lshaffer
ID: 1828537
This may be a workable solution. Time will tell. Thanks
0

Featured Post

What Is Transaction Monitoring and who needs it?

Synthetic Transaction Monitoring that you need for the day to day, which ensures your business website keeps running optimally, and that there is no downtime to impact your customer experience.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This tutorial will discuss fancy secure registration forms, with AJAX technology support. In this article I assume you already know HTML and some JS. I will write the code using WhizBase Server Pages, so you need to know some basics in WBSP (you mig…
The Windows functions GetTickCount and timeGetTime retrieve the number of milliseconds since the system was started. However, the value is stored in a DWORD, which means that it wraps around to zero every 49.7 days. This article shows how to solve t…
Learn the basics of strings in Python: declaration, operations, indices, and slicing. Strings are declared with quotations; for example: s = "string": Strings are immutable.: Strings may be concatenated or multiplied using the addition and multiplic…
The viewer will learn how to dynamically set the form action using jQuery.

717 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question