CodeCharge Studio
search Register Login  

Web Reporting

Visually create Web Reports in PHP, ASP, .NET, Java, Perl and ColdFusion.
CodeCharge.com

YesSoftware Forums -> CodeCharge Studio -> .NET

 Prevent multiple clicks of a submit button

Print topic Send  topic

Author Message
E43509

Posts: 283
Posted: 03/08/2004, 10:15 AM

I'm having a problem that a user does not wait until the postback is complete and hits the button again and again. I've looked for ways to stop this but can't get them working or don't have enough asp.net knowledge to make it happen. How has anyone approached this problem? When I disable the button on cilck in javascript then nothing happens, even though I can put in a doPostBack. A likely article was on the web http://aspzone.com/articles/207.aspx but I can't get the code to compile (problem with getPostBackEventReference ).
Any ideas?
View profile  Send private message
cpopham

Posts: 8
Posted: 03/24/2004, 8:43 AM

Could you possibly just use a counter variable and when they click on the submit button the first time it disables it. Then if they click again have an if statement in that checks the counter and when the counter is say 1 instead of 0 a message pops up saying they have already pressed submit once and to please wait. or when they click the submit button have a message popup stating they should wait for the post back. Or just have a big message in bold that says please only press the submit button once and wait for the post back.

Just some ideas.

Chester
View profile  Send private message
Eiden
Posted: 06/29/2004, 1:29 PM

Try this javascript in the button onclick event:

onclick="document.formname.Button_DoLogin.disabled=true;document.formname.su
bmit();"


Add new topic Subscribe to topic   


These are Community Forums for users to exchange information.
If you would like to obtain technical product help please visit http://support.yessoftware.com.

Web Database

Join thousands of Web developers who build Web applications with minimal coding.
CodeCharge.com

Home   |    Search   |    Members   |    Register   |    Login


Powered by UltraApps Forum created with CodeCharge Studio
Copyright 2003-2004 by UltraApps.com  and YesSoftware, Inc.