473,816 Members | 2,269 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

How To Stop Students From Clicking Twice

We need to stop students from clicking on the form button more than once.

We have a form that students fill out with their credit card information.
They click, the form sends the data in xml to Bank of America, theres a
short wait, BofA sends back some xml, and on to the next page.

Sometimes, though, BofA is slow and the students get impatient, clicking
twice or even more. They get charged each time they click.

We have a warning that says, 'Click only once' but students don't heed it.

Any ideas?
Nov 18 '05 #1
10 2549
you can disable the button on click. either you can choose to write the code
for that or you download the same (if someone is kind enough to do it for
you)
have a look at
http://aspzone.com/archive/2004/01/06/292.aspx

i have used it in past and it works great. Check the demo. if you like what
you see.. download the project compile it and use the oneclickbutton instead
of normal button

--

Regards,

Hermit Dave
(http://hdave.blogspot.com)
"Jim Bayers" <sp**@spamity.s pam> wrote in message
news:Xn******** *************** ******@207.46.2 48.16...
We need to stop students from clicking on the form button more than once.

We have a form that students fill out with their credit card information.
They click, the form sends the data in xml to Bank of America, theres a
short wait, BofA sends back some xml, and on to the next page.

Sometimes, though, BofA is slow and the students get impatient, clicking
twice or even more. They get charged each time they click.

We have a warning that says, 'Click only once' but students don't heed it.

Any ideas?

Nov 18 '05 #2
> We have a warning that says, 'Click only once' but students don't heed it.

On the first click, immediately direct them to a new page while you wait for
the data to return.

Even then, you're going to get some folks that instinctively double-click.
The best bet is to write code to check for that. Log the first click and
then on each click, check to see that there isn't one already submitted in
the last X seconds with the same data. If so, ignore it.

-Darrel
Nov 18 '05 #3
Here are a couple similar techniques to prevent users from getting too click
happy:
http://aspzone.com/articles/207.aspx

http://aspzone.com/archive/2004/01/06/292.aspx
--
I hope this helps,
Steve C. Orr, MCSD, MVP
http://Steve.Orr.net


"Jim Bayers" <sp**@spamity.s pam> wrote in message
news:Xn******** *************** ******@207.46.2 48.16...
We need to stop students from clicking on the form button more than once.

We have a form that students fill out with their credit card information.
They click, the form sends the data in xml to Bank of America, theres a
short wait, BofA sends back some xml, and on to the next page.

Sometimes, though, BofA is slow and the students get impatient, clicking
twice or even more. They get charged each time they click.

We have a warning that says, 'Click only once' but students don't heed it.

Any ideas?

Nov 18 '05 #4
Good rule of thumb: NEVER count on your users to do what they are supposed
to do. Students, teachers, and Joe SixPack alike, humans are unreliable and
unpredictable. Anything in your app that is necessary to be done should be
done BY your app.

IOW, you can't stop it. Therefore, you handle it. You write code into your
app that handles the event of a user clicking a button twice. Some solutions
include:

1. After clicking once, disable or hide the button. This can be done
server-side or client-side. Best to do it on the server, so as to survive
postbacks.
2. Use a server-side persistent value (ViewState or SessionState) that is
set the first time the user clicks the button. Check that value to see
whether the button has already been clicked prior to executing the business
logic that you don't want repeated.

--
HTH,
Kevin Spencer
..Net Developer
Microsoft MVP
I get paid good money to
solve puzzles for a living

"Jim Bayers" <sp**@spamity.s pam> wrote in message
news:Xn******** *************** ******@207.46.2 48.16...
We need to stop students from clicking on the form button more than once.

We have a form that students fill out with their credit card information.
They click, the form sends the data in xml to Bank of America, theres a
short wait, BofA sends back some xml, and on to the next page.

Sometimes, though, BofA is slow and the students get impatient, clicking
twice or even more. They get charged each time they click.

We have a warning that says, 'Click only once' but students don't heed it.

Any ideas?

Nov 18 '05 #5
Jim Bayers <sp**@spamity.s pam> wrote in
news:Xn******** *************** ******@207.46.2 48.16:
We have a form that students fill out with their credit card
information. They click, the form sends the data in xml to Bank of
America, theres a short wait, BofA sends back some xml, and on to the
next page.


Can you do an asyncronous process?

Submit the form and redirect the students to a thank you page.

In the background process the CC transaction. If there is a failure, e-mail
the student?

This way you can reduce double clicks drastically.

Someone else mentioned disabling the submit button. This works as well but
doesn't prevent double clicks (i.e. If the student has javascript
disabled).
--
Lucas Tam (RE********@rog ers.com)
Please delete "REMOVE" from the e-mail address when replying.
http://members.ebay.com/aboutme/coolspot18/
Nov 18 '05 #6
> 1. After clicking once, disable or hide the button. This can be done
server-side or client-side. Best to do it on the server, so as to survive
postbacks.


Its interesting for me, how are you going to do this server side?

When the user clicks on button, a post request is initiated by
the browser. Until the response from server arrived you have OLD PAGE
IN YOUR BROWSER WITH ENABLED BUTTON - you can press the button again.

Such issues must be done ONLY client side. Write a javascript function
which will set IFRAME over all other objects with message "Please wait"
inside, and make so that it is invoked when the button clicked.

Nov 18 '05 #7
You made a good point. I will change my recommendation to "both client and
server-side" - client-side for immediacy, and server-side for surviving
PostBacks.

--
HTH,
Kevin Spencer
..Net Developer
Microsoft MVP
I get paid good money to
solve puzzles for a living

"Ihor Bobak" <Ihor Bo***@discussio ns.microsoft.co m> wrote in message
news:07******** *************** ***********@mic rosoft.com...
1. After clicking once, disable or hide the button. This can be done
server-side or client-side. Best to do it on the server, so as to survive postbacks.


Its interesting for me, how are you going to do this server side?

When the user clicks on button, a post request is initiated by
the browser. Until the response from server arrived you have OLD PAGE
IN YOUR BROWSER WITH ENABLED BUTTON - you can press the button again.

Such issues must be done ONLY client side. Write a javascript function
which will set IFRAME over all other objects with message "Please wait"
inside, and make so that it is invoked when the button clicked.

Nov 18 '05 #8

OneClick Control

http://www.metabuilders.com/Tools/OneClick.aspx

"Jim Bayers" <sp**@spamity.s pam> wrote in message
news:Xn******** *************** ******@207.46.2 48.16...
We need to stop students from clicking on the form button more than once.

We have a form that students fill out with their credit card information.
They click, the form sends the data in xml to Bank of America, theres a
short wait, BofA sends back some xml, and on to the next page.

Sometimes, though, BofA is slow and the students get impatient, clicking
twice or even more. They get charged each time they click.

We have a warning that says, 'Click only once' but students don't heed it.

Any ideas?


Nov 18 '05 #9
That is a nice Control!

--
HTH,
Kevin Spencer
..Net Developer
Microsoft MVP
I get paid good money to
solve puzzles for a living

"Ken Cox [Microsoft MVP]" <BA************ @sympatico.ca> wrote in message
news:O4******** ******@TK2MSFTN GP14.phx.gbl...

OneClick Control

http://www.metabuilders.com/Tools/OneClick.aspx

"Jim Bayers" <sp**@spamity.s pam> wrote in message
news:Xn******** *************** ******@207.46.2 48.16...
We need to stop students from clicking on the form button more than once.
We have a form that students fill out with their credit card information. They click, the form sends the data in xml to Bank of America, theres a
short wait, BofA sends back some xml, and on to the next page.

Sometimes, though, BofA is slow and the students get impatient, clicking twice or even more. They get charged each time they click.

We have a warning that says, 'Click only once' but students don't heed it.
Any ideas?

Nov 18 '05 #10

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
1847
by: Earl T | last post by:
I am using IE only for this control I am building. I have created a rich text box that the user can popup (using dhtml and a div tag) to allow the user to enter wiziwig html text. However, when the popup is displayed, I would like to pervent the user from clicking outside of the popup. I can get it to partially work by putting an onclick event in the body tag and setting focus back to an element of the popup. However, buttons are still...
2
3827
by: anonieko | last post by:
Scenario: You have a page that is TOO slow to refresh. But it allows partial flushing of html contents. I.e. Submit button already appears but you don't want your users to click on it prematurely because other parts are still coming. Here I put a javascript the will enable only submit button only after 5 seconds after the page is load fully.
3
8837
by: Imran Aziz | last post by:
Hello All, I have a search text and button that post data and my button handler filters the repeater control. However when the button is clicked the first time. The page_load event is being called twice, once with postback true, and second time without postback. This only happens for this button. How can I sort out this issue, any clues what to look for to get this sorted please. <p>Search Bookmarks: <asp:TextBox ID="txtSearch"...
6
5256
by: John (Z R) L | last post by:
Hi all, I am very new to programming, and I chose to study the Python language before C++. I am currently using the Wikibooks "Non-Programmer's Tutorial for Python", and am up to the section "Who goes there"? http://en.wikibooks.org/wiki/Non-Programmer%27s_Tutorial_for_Python/Who_Goes_There%3F But after clicking "run module" for " a = 1
0
1066
by: csgraham74 | last post by:
Hi, I have a weird problem that is happening on my ASP.Net (1.1) web application. I have built a page that has a button control. Basiaclly this performs a search using a datarow. The problem is that event does not fire until the button is clicked twice. The page load event fires on both occasions but the button event only fires on the second click. Can anyome give me a pointer on how to sove this solution or how to debug to find where...
3
1069
by: =?Utf-8?B?QmFkaXM=?= | last post by:
Hi, In my web form i have problem that I have to click twice a button for the code behind to be executed!!!? Why!?
1
1497
by: jonkemm | last post by:
I'm making a a system for my school to allow students to have some online space to store their school files on. It has a basic upload / create folder / download / delete bit, it also has a 'submit work to teacher bit that copies their file into their teachers folder in the correct year group. My question is this: I'm not really expecting students to abuse it but you never know, what sort of things should I look out for to stop students...
3
2607
by: Lowrider | last post by:
I'm new to the VB programming world and am having a problem with flow control. In the code below I check 3 textboxes and display a messagebox if one or more are left blank. The problem lies in that I don't know how to stop the program flow after the user clicks the OK button on the message box. The program continues to run. I know that I am missing some piece of code to halt the flow. Thank you for any help with this problem. My email is...
2
1632
by: fran7 | last post by:
Hi, I have this very nice link tracker script that works a treat. The only thing is it doesnt restrict repeat clicking. Is there a simple method to add a cookie feature to this so that people cannot vote twice. I prefer cookies over ip recording. Any pointers would be a great help. %@ Language=VBScript %> <% Option Explicit ' Never code without it!
0
10674
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
10409
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
10433
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
10149
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
9227
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
7689
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5712
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
4361
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
3889
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.