473,498 Members | 1,832 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

How can I stop repeat clicks

When the web page takes a while to process users get impatient and click the
button again. I need to throw these extra clicks away or disable the button
after the first click.
--
tsiGeorge
Nov 19 '05 #1
4 1310
On Fri, 24 Jun 2005 14:22:02 -0500, tsiGeorge <mo***@community.nospam>
wrote:
When the web page takes a while to process users get impatient and click
the
button again. I need to throw these extra clicks away or disable the
button
after the first click.


There was a discussion of this a few days ago:

http://groups-beta.google.com/group/...1f13c42?rnum=1

--
Craig Deelsnyder
Microsoft MVP - ASP/ASP.NET
Nov 19 '05 #2
You will have to disable the button.

"tsiGeorge" <mo***@community.nospam> wrote in message
news:3F**********************************@microsof t.com...
When the web page takes a while to process users get impatient and click
the
button again. I need to throw these extra clicks away or disable the
button
after the first click.
--
tsiGeorge

Nov 19 '05 #3
Still having a problem. I've converted the code to VB and have:

btnOkay.Attributes.Add("onclick", "javascript:document.getElementById('" _
& btnOkay.ClientID + "').disabled=true;" &
Page.GetPostBackEventReference(btnOkay))

On the Web page it's

<tr>
<TD align="center"><input type="image" name="btnOkay"
onclick="javascript:document.getElementById('btnOk ay').disabled=true;__doPostBack('btnOkay','')if
(typeof(Page_ClientValidate) == 'function') Page_ClientValidate(); "
language="javascript" id="btnOkay" src="imgBtnOkay.gif" alt="Click to accept
the name as the signer." border="0" /></TD>
</tr>

Don't understand this code but it doesn't stop repeat clicks. Additional
HELP please!

--
tsiGeorge
"Craig Deelsnyder" wrote:
On Fri, 24 Jun 2005 14:22:02 -0500, tsiGeorge <mo***@community.nospam>
wrote:
When the web page takes a while to process users get impatient and click
the
button again. I need to throw these extra clicks away or disable the
button
after the first click.


There was a discussion of this a few days ago:

http://groups-beta.google.com/group/...1f13c42?rnum=1

--
Craig Deelsnyder
Microsoft MVP - ASP/ASP.NET

Nov 19 '05 #4
Got it!

in Page_load
btnOkay.Attributes.Add("onclick", "javascript:document.getElementById('" _
& btnOkay.ClientID + "').disabled=true;" &
Page.GetPostBackEventReference(btnOkay) & ";")

which results in

<tr>
<TD align="center"><input type="image" name="btnOkay"
onclick="javascript:document.getElementById('btnOk ay').disabled=true;__doPostBack('btnOkay','');if
(typeof(Page_ClientValidate) == 'function') Page_ClientValidate(); "
language="javascript" id="btnOkay" src="imgBtnOkay.gif" alt="Click to accept
the name as the signer." border="0" /></TD>
</tr>

I was missing a semi-colon.

Thanks for your help.

--
tsiGeorge
"Craig Deelsnyder" wrote:
On Fri, 24 Jun 2005 14:22:02 -0500, tsiGeorge <mo***@community.nospam>
wrote:
When the web page takes a while to process users get impatient and click
the
button again. I need to throw these extra clicks away or disable the
button
after the first click.


There was a discussion of this a few days ago:

http://groups-beta.google.com/group/...1f13c42?rnum=1

--
Craig Deelsnyder
Microsoft MVP - ASP/ASP.NET

Nov 19 '05 #5

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

Similar topics

9
2388
by: Harald Armin Massa | last post by:
I need to do some synchronisations like in a cron.job import time from threading import Thread class updater(Thread): def run(self): while True: do_updates() time.sleep(600)
3
1705
by: Niyazi | last post by:
Hi, I created application that I get information from AS400 for reporting. In main.exe has only 1 frm which calls (as a class library) CLS_MAIN.dll. The CLS_MAIN.dll get the tables from AS400...
2
1590
by: McGeeky | last post by:
I use page_load to call a stored procedure and populate the form. When the user clicks the OK button on the form I have implemented an event handler behind it (OKButton_Click()) that calls another...
7
2251
by: jab3 | last post by:
Hello. I'm wondering if someone can answer something I'm sure has been answered a thousand times before. I am apparently just too dumb to find the answer. :) I've found information about the...
2
1859
by: Chameleon | last post by:
I have a BIG php output and I start to transmit after client's request. What happen on server when client press "Stop"? PHP continues to send data? Where? Until the end?
0
1176
by: =?Utf-8?B?YW1iZXI=?= | last post by:
Hello! I have a form that contains a tabcontrol, that is populated based on which record a user selects in a listbox on the form. I just added code to 'mytab.validating' so if the user tries to...
9
3971
by: Jon Slaughter | last post by:
I'm using Thread and ThreadStart to create a thread for testing purposes and I do not want to use a pool because the thread exists for the life time of the app. Eventually I might move on to using...
2
11064
by: =?Utf-8?B?R2lyaXNo?= | last post by:
Hello All, I am displaying a report in a gridview and also in a separte html table. When the user clicks a print button, I print the report (from gridview or from html table). But I want to repeat...
33
11576
by: Sunny | last post by:
Hi, Sometime, when your script is too big, IE Gives you a warning "Stop Running This Script" A script on this page is causing Internet Explorer to run slowly. Does anyone knows, How to...
0
7197
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...
1
6881
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...
0
7375
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...
1
4899
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...
0
4584
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
3078
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
1411
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 ...
1
650
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
287
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence...

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.