Perl Programming
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me
Go Back   Dev Shed ForumsProgramming LanguagesPerl Programming

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread Dev Shed Forums Sponsor:
  #1  
Old May 30th, 2001, 03:12 PM
lustyx lustyx is offline
Registered User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: May 2001
Posts: 25 lustyx User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
Unhappy Double clicking the submit button

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

Reply With Quote
  #2  
Old June 1st, 2001, 10:51 AM
feha feha is offline
Member
Dev Shed Newbie (0 - 499 posts)
 
Join Date: May 2001
Location: SE
Posts: 28 feha User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
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...

Reply With Quote
  #3  
Old June 3rd, 2001, 06:10 AM
miroslav miroslav is offline
Member
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Apr 2001
Location: Belgrade, Yugoslavia
Posts: 19 miroslav User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
Send a message via ICQ to miroslav
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

Reply With Quote
  #4  
Old June 4th, 2001, 10:07 AM
GabePreston GabePreston is offline
Junior Member
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Mar 2001
Location: York, PA
Posts: 0 GabePreston User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
Send a message via ICQ to GabePreston Send a message via AIM to GabePreston Send a message via Yahoo to GabePreston
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.

Reply With Quote
  #5  
Old June 6th, 2001, 02:25 AM
footinmouth footinmouth is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: May 2001
Location: North Vancouver, BC, Canada
Posts: 44 footinmouth User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 8
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

Reply With Quote
Reply

Viewing: Dev Shed ForumsProgramming LanguagesPerl Programming > Double clicking the submit button


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump


Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 2 hosted by Hostway