|
|
|||||||||
|
|||||||||
| |||||||||
|
|
|
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
#1
|
|||
|
|||
|
I'm having problems managing users who double click the "submit" button when posting my forms to the web. The Perl executes twice and causes problems.
This usually happens when users are waiting form the form to process, get impatient, and click on the submit button again. This double click is causing problems with my Perl script. Does anyone know of a way to handle this. I imagine it being a common problem especially for those who do not want their credit cards billed twice. Thank you |
|
#2
|
|||
|
|||
|
you should make a temporary log.txt file that writes IP and checks time which you can set to 1 minute....
similar with the gateway on top-sites.... I don't have a time to write a complete code... but this is an idea... |
|
#3
|
|||
|
|||
|
why don't you first output the html which says:
Form processing... please wait, you are being redirected... the form starts to work after that output, and then output the html: Form finished, thanks you for sending info or whatever... then close the script that way when the user clicks on submit, script first process the html output, and then works on a form. if it is long, and takes time to be done, the user won't see that finished note... until it's finshed... ![]() or simply on a submit button put a text : Submit - press once and wait until it get's processed... or something like that |
|
#4
|
|||
|
|||
|
You could use a simple Javascript that has a global variable set to 0, and when they click the submit button once, the global variable is set to 1. Then if they were to try to click the submit button again, it wouldn't follow through with the request since the variable is now a 1, meaning they already clicked submit.
|
|
#5
|
|||
|
|||
|
Think simple first
Okay one submit only ......
Hmmmmm...... Javascript works if the browser has it turned ON or is JS wurkin So : Submit goes to cgi / perl or ....... 1. Print header content type Loop while waiting Response: 2. print "<script language=\"Javascript\">\n" print " document.write('Processing Request time = $time')\;\n"; print "</script>\n"; print "<noscript>Processing request time = $time</noscript>\n"; End Loop; 3. Print Final Response with HTML code ============================ UNTESTED but why not .... SNAFU : All browsers and Netscape ???
__________________
Thanks Foot in Mouth ver 1.2.5 Onion |
![]() |
| Viewing: Dev Shed Forums > Programming Languages > Perl Programming > Double clicking the submit button |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|