<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="http://weblogs.asp.net/utility/FeedStylesheets/rss.xsl" media="screen"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:wfw="http://wellformedweb.org/CommentAPI/"><channel><title>you don't want to disable buttons after they are clicked</title><link>http://weblogs.asp.net/asmith/archive/2003/09/10/27063.aspx</link><description>No, i'm not trying to use jedi mind tricks on you. You really don't want to go down the road of disabling buttons after they've been clicked. Here's what happens... A developer sees that some user with zero patience is clicking the &amp;#8220;Process Page&amp;#8221;</description><dc:language>en</dc:language><generator>CommunityServer 2007 SP1 (Build: 20510.895)</generator><item><title>re: you don't want to disable buttons after they are clicked</title><link>http://weblogs.asp.net/asmith/archive/2003/09/10/27063.aspx#7206521</link><pubDate>Tue, 15 Sep 2009 13:04:44 GMT</pubDate><guid isPermaLink="false">c06e2b9d-981a-45b4-a55f-ab0d8bbfdc1c:7206521</guid><dc:creator>PH81</dc:creator><author>PH81</author><description>&lt;p&gt;maybe use javascript to change the onclick event of button so that it asks on next click user that u have just send request and ist still beeing prosessed&lt;/p&gt;
&lt;p&gt;do u want to resend your request.&lt;/p&gt;
&lt;p&gt;if the first request (or any) is ok it will set the onclick to original value that button is ready to click without prompt.&lt;/p&gt;
&lt;img src="http://weblogs.asp.net/aggbug.aspx?PostID=7206521" width="1" height="1"&gt;</description></item><item><title>re: you don't want to disable buttons after they are clicked</title><link>http://weblogs.asp.net/asmith/archive/2003/09/10/27063.aspx#6617996</link><pubDate>Thu, 11 Sep 2008 04:08:51 GMT</pubDate><guid isPermaLink="false">c06e2b9d-981a-45b4-a55f-ab0d8bbfdc1c:6617996</guid><dc:creator>Arun</dc:creator><author>Arun</author><description>&lt;p&gt;&lt;a rel="nofollow" target="_new" href="http://codekeep.net/snippets/9b1d8e28-bd4d-48c7-b64e-f3d7da976dfb.aspx"&gt;codekeep.net/.../9b1d8e28-bd4d-48c7-b64e-f3d7da976dfb.aspx&lt;/a&gt;&lt;/p&gt;
&lt;img src="http://weblogs.asp.net/aggbug.aspx?PostID=6617996" width="1" height="1"&gt;</description></item><item><title>re: you don't want to disable buttons after they are clicked</title><link>http://weblogs.asp.net/asmith/archive/2003/09/10/27063.aspx#6596044</link><pubDate>Wed, 03 Sep 2008 19:11:31 GMT</pubDate><guid isPermaLink="false">c06e2b9d-981a-45b4-a55f-ab0d8bbfdc1c:6596044</guid><dc:creator>ajones</dc:creator><author>ajones</author><description>&lt;p&gt;Disabling a button and still getting a postback is easy just use the following code and it works great all of the time:&lt;/p&gt;
&lt;p&gt;cmdButton.Attributes.Add(&amp;quot;onclick&amp;quot;, &amp;quot;this.value='Please wait...';this.disabled=true;&amp;quot; &amp;amp; GetPostBackEventReference(Me.cmdButton))&lt;/p&gt;
&lt;p&gt;Viola, you have a disabled button with postback and preventing any duplicates without doing any server side crap. &amp;nbsp;Put this code in the Page_Load event.&lt;/p&gt;
&lt;img src="http://weblogs.asp.net/aggbug.aspx?PostID=6596044" width="1" height="1"&gt;</description></item><item><title>re: you don't want to disable buttons after they are clicked</title><link>http://weblogs.asp.net/asmith/archive/2003/09/10/27063.aspx#5484082</link><pubDate>Fri, 21 Dec 2007 16:51:29 GMT</pubDate><guid isPermaLink="false">c06e2b9d-981a-45b4-a55f-ab0d8bbfdc1c:5484082</guid><dc:creator>Mal</dc:creator><author>Mal</author><description>&lt;p&gt;As a none wokring sample that I have been working on recently I come up with this&lt;/p&gt;
&lt;p&gt;&amp;lt;form method=&amp;quot;post&amp;quot; action=&amp;quot;&lt;a rel="nofollow" target="_new" href="http://www.google.co.uk&amp;quot;&amp;gt;"&gt;http://www.google.co.uk&amp;quot;&amp;gt;&lt;/a&gt; &lt;/p&gt;
&lt;p&gt;&amp;lt;input id=&amp;quot;text&amp;quot; type=&amp;quot;text&amp;quot; width=&amp;quot;15&amp;quot;&amp;gt; &lt;/p&gt;
&lt;p&gt;&amp;lt;input id=&amp;quot;btn1&amp;quot; type=&amp;quot;submit&amp;quot; onclick=&amp;quot;this.disabled=true&amp;quot;&amp;gt;&lt;/p&gt;
&lt;p&gt;&amp;lt;input id=&amp;quot;btn2&amp;quot; type=&amp;quot;button&amp;quot; onclick=&amp;quot;this.form.btn1.disabled=false&amp;quot; value=&amp;quot;Enable Submit Button&amp;quot;&amp;gt; &lt;/p&gt;
&lt;p&gt;&amp;lt;/form&amp;gt;&lt;/p&gt;
&lt;p&gt;You can hide the reset button and change the color of the submit button at the same time as showing an animated image that the process has started. &lt;/p&gt;
&lt;img src="http://weblogs.asp.net/aggbug.aspx?PostID=5484082" width="1" height="1"&gt;</description></item><item><title>re: you don't want to disable buttons after they are clicked</title><link>http://weblogs.asp.net/asmith/archive/2003/09/10/27063.aspx#4768117</link><pubDate>Fri, 26 Oct 2007 16:10:36 GMT</pubDate><guid isPermaLink="false">c06e2b9d-981a-45b4-a55f-ab0d8bbfdc1c:4768117</guid><dc:creator>Frank</dc:creator><author>Frank</author><description>&lt;p&gt;Just a though. Another way to handle this is to spawn a new thread to handle the functionality that the button is supposed to handle. I know that sounds like a lot of work, but it really isn't.&lt;/p&gt;
&lt;img src="http://weblogs.asp.net/aggbug.aspx?PostID=4768117" width="1" height="1"&gt;</description></item><item><title>re: you don't want to disable buttons after they are clicked</title><link>http://weblogs.asp.net/asmith/archive/2003/09/10/27063.aspx#3446523</link><pubDate>Thu, 09 Aug 2007 11:52:26 GMT</pubDate><guid isPermaLink="false">c06e2b9d-981a-45b4-a55f-ab0d8bbfdc1c:3446523</guid><dc:creator>Rupesh</dc:creator><author>Rupesh</author><description>&lt;p&gt;I have also faced the same problem but i used floating transparent division for avoiding this issue. All we have to do one simple thing on client click just show &amp;nbsp;division with 100% width and 100% height which covers all the page (position of div u can keep as absolute according to u r setting) and if user clicks again event will fire on that div not on button.i did same thing and my problem is solved anyway if any of u r having better solution plz add here&lt;/p&gt;
&lt;img src="http://weblogs.asp.net/aggbug.aspx?PostID=3446523" width="1" height="1"&gt;</description></item><item><title>re: you don't want to disable buttons after they are clicked</title><link>http://weblogs.asp.net/asmith/archive/2003/09/10/27063.aspx#132634</link><pubDate>Sat, 15 May 2004 22:13:00 GMT</pubDate><guid isPermaLink="false">c06e2b9d-981a-45b4-a55f-ab0d8bbfdc1c:132634</guid><dc:creator>John</dc:creator><author>John</author><description>I found that disabling the submit button works fine in Mozilla, but not in IE.  The work-around was to create an onSubmit event in the form that disabled the submit button.&lt;img src="http://weblogs.asp.net/aggbug.aspx?PostID=132634" width="1" height="1"&gt;</description></item><item><title>re: you don't want to disable buttons after they are clicked</title><link>http://weblogs.asp.net/asmith/archive/2003/09/10/27063.aspx#107628</link><pubDate>Mon, 05 Apr 2004 09:47:00 GMT</pubDate><guid isPermaLink="false">c06e2b9d-981a-45b4-a55f-ab0d8bbfdc1c:107628</guid><dc:creator>TBORE Toronto</dc:creator><author>TBORE Toronto</author><description>I would still handle it on the server with a session variable set when data is accepted from the user. A hidden field variable is sent along as last_post_id or something. A quick check will reveal if the new request is identical to the previous one.&lt;img src="http://weblogs.asp.net/aggbug.aspx?PostID=107628" width="1" height="1"&gt;</description></item><item><title>re: you don't want to disable buttons after they are clicked</title><link>http://weblogs.asp.net/asmith/archive/2003/09/10/27063.aspx#84804</link><pubDate>Fri, 05 Mar 2004 20:03:00 GMT</pubDate><guid isPermaLink="false">c06e2b9d-981a-45b4-a55f-ab0d8bbfdc1c:84804</guid><dc:creator>JulianG</dc:creator><author>JulianG</author><description>Hey!&lt;br&gt;What about disabling the button for a while?&lt;br&gt;&lt;br&gt;Then you enable it again (if the page is still there).&lt;br&gt;&lt;br&gt;This way if the post fails, the button will be enabled again in a few seconds.&lt;br&gt;&lt;br&gt;Of course you have no way to know the post failed or it's still posting, but...&lt;br&gt;what the hell! Maybe it's a good option.&lt;br&gt;&lt;img src="http://weblogs.asp.net/aggbug.aspx?PostID=84804" width="1" height="1"&gt;</description></item><item><title>re: you don't want to disable buttons after they are clicked</title><link>http://weblogs.asp.net/asmith/archive/2003/09/10/27063.aspx#62095</link><pubDate>Fri, 23 Jan 2004 13:54:00 GMT</pubDate><guid isPermaLink="false">c06e2b9d-981a-45b4-a55f-ab0d8bbfdc1c:62095</guid><dc:creator>Larryb</dc:creator><author>Larryb</author><description>All you need to do is put a layer on it or whatever and remove the layer on a timer, say after 30 seconds.&lt;img src="http://weblogs.asp.net/aggbug.aspx?PostID=62095" width="1" height="1"&gt;</description></item></channel></rss>