Forum Moderators: phranque

Message Too Old, No Replies

Users who keep hitting submit

problem with users hitting submit on a transaction form too many times

         

aeomac

6:31 pm on Jan 22, 2003 (gmt 0)

10+ Year Member



Im having a problem with users hitting the submit button too many times on a transaction website. Im using verisign to conduct the transaction, but before the form even posts the person has hit the sumbit button 4 or 5 times.

Does anyone have a way to disable this? or an elegant workaround?

thanks in advance!

bcc1234

6:35 pm on Jan 22, 2003 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Well, you can use javascript. But I have never had a problem with people hitting the submit button so many times.

Does it take too long for the request to get processed? That sure pisses people off.

Anyway, if you want to use javascript - then create a function that would use a global variable and would be reset on page load. After that, your function should only return true once (and set the global variable) so the next time it returns false. And run this function onsubmit in your form.

Marketing Guy

6:37 pm on Jan 22, 2003 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Simple solution (you may be doing this already)....

A note at some point that there is only need to click once, as the transaction may take a few seconds.

Or you could scare them by saying that clicking more than once will submit multiple orders! ;)

You may lose business that way though....

Syren_Song

6:38 pm on Jan 22, 2003 (gmt 0)

10+ Year Member



I don't have an answer for your problem, I'm afraid, but I can speak from experience on the topic from a user's point of view.

I generally use Netscape to browse and sometimes when I hit the submit button, I wait for several minutes and nothing happens. So I hit it again. Then I have to hit it again before I give up and hope my order/request/cancellation went through to the proper party.

I'm assuming either the sites are programmed in some way that conflicts with my browser, or the program has some small glitch in it that keeps the proper page from coming up after the submit button is pressed.

Hope this helps at least a little bit. ;)

aeomac

7:14 pm on Jan 22, 2003 (gmt 0)

10+ Year Member



Netscape, i have not thought about that - this could be browser specific!

Yes i do have a disclaimer in bold face...i guess nobody reads directions :)

thanks for the help! ill look into this global javascript variable thing...

Syren_Song

7:36 pm on Jan 22, 2003 (gmt 0)

10+ Year Member



Actually, I did read the directions. They told me to wait because a new page would popup confirming my order in a minute. After 3+ minutes, I figured something went wrong somewhere and hit the submit button again.

Maybe I was impatient, but I thought 3 mintues was more than enough time for any program to execute and bring up a confirmation page. So I hit the button again. I never did get my confirmation page, although I did receive a confirming email which I promptly replied to requesting that I not be charged multiple times for my order, and explaining why I had hit the submit button more than once. ;)

aeomac

8:30 pm on Jan 23, 2003 (gmt 0)

10+ Year Member



wow, i figured out what was going wrong. It actually was not the double post. the application was "crashing" and not sending the person their reciept while still billing their credit card. The users were then logging back into the form and trying to purchase the service at a later time.

How horrible!

thanks for the tips folks :)

antirack

1:06 am on Jan 25, 2003 (gmt 0)

10+ Year Member



I've the following javascript function in our credit card payment page:

[codes]
<SCRIPT language=JavaScript>
<!-- Global Javasccript functions...

function LockButtons (whichform)
{
ua = new String(navigator.userAgent);
if (ua.match(/IE/g)) {
for (i=1; i<whichform.elements.length; i++) {
if ((whichform.elements[i].type == 'submit') ¦¦ (whichform.elements[i].type == 'button')) {
whichform.elements[i].disabled = true;
}
}
}
whichform.submit();
}
// done hiding -->
</SCRIPT>
[/codes]

Then the submit button looks somewhat like this:

<input type="submit" name="Submit" value="Complete Payment" onClick="javascript:LockButtons(this.form);">

Note that I am not a Javascript programmer, but PHP. I have ripped this out of PayPal's contact page as I saw they are using it.

Hope that helps.
Alex

Gravelrash

11:43 am on Jan 28, 2003 (gmt 0)

10+ Year Member



Here's a nice elegant way of preventing multiple clicks:

<input type="button" value="Submit" onClick="if(this.value == 'Submit') this.form.submit(); this.value = 'Please Wait';" />