<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	>
<channel>
	<title>Comments on: Disable button after first click</title>
	<atom:link href="http://www.scriptygoddess.com/archives/2003/04/13/disable-button-after-first-click/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.scriptygoddess.com/archives/2003/04/13/disable-button-after-first-click/</link>
	<description></description>
	<pubDate>Sat, 30 Aug 2008 11:31:12 +0000</pubDate>
	<generator>http://wordpress.org/?v=2.5.1</generator>
		<item>
		<title>By: Selvaraj</title>
		<link>http://www.scriptygoddess.com/archives/2003/04/13/disable-button-after-first-click/#comment-13774</link>
		<dc:creator>Selvaraj</dc:creator>
		<pubDate>Tue, 04 Jan 2005 12:00:16 +0000</pubDate>
		<guid isPermaLink="false">http://www.scriptygoddess.com/archives/2003/04/13/disable-button-after-first-click/#comment-13774</guid>
		<description>How to disable the minimize and maximize button By using the javascript function</description>
		<content:encoded><![CDATA[<p>How to disable the minimize and maximize button By using the javascript function</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: chaotic intransient prose bursts</title>
		<link>http://www.scriptygoddess.com/archives/2003/04/13/disable-button-after-first-click/#comment-12621</link>
		<dc:creator>chaotic intransient prose bursts</dc:creator>
		<pubDate>Thu, 16 Sep 2004 01:13:47 +0000</pubDate>
		<guid isPermaLink="false">http://www.scriptygoddess.com/archives/2003/04/13/disable-button-after-first-click/#comment-12621</guid>
		<description>&lt;trackback /&gt;&lt;strong&gt;Submit only once!&lt;/strong&gt;
A simple way to prevent duplicate comments.</description>
		<content:encoded><![CDATA[<trackback /><strong>Submit only once!</strong><br />
A simple way to prevent duplicate comments.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: johnny B</title>
		<link>http://www.scriptygoddess.com/archives/2003/04/13/disable-button-after-first-click/#comment-9727</link>
		<dc:creator>johnny B</dc:creator>
		<pubDate>Tue, 30 Nov 1999 00:00:00 +0000</pubDate>
		<guid isPermaLink="false">http://www.scriptygoddess.com/archives/2003/04/13/disable-button-after-first-click/#comment-9727</guid>
		<description>Not to raise a dead issue, but it doesn't have to be so hard:

onClick="this.disabled=true; this.value='Sending...'; this.form.submit();"

What's more to it than that?</description>
		<content:encoded><![CDATA[<p>Not to raise a dead issue, but it doesn&#8217;t have to be so hard:</p>
<p>onClick=&#8221;this.disabled=true; this.value=&#8217;Sending&#8230;&#8217;; this.form.submit();&#8221;</p>
<p>What&#8217;s more to it than that?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Benjamin</title>
		<link>http://www.scriptygoddess.com/archives/2003/04/13/disable-button-after-first-click/#comment-9728</link>
		<dc:creator>Benjamin</dc:creator>
		<pubDate>Tue, 30 Nov 1999 00:00:00 +0000</pubDate>
		<guid isPermaLink="false">http://www.scriptygoddess.com/archives/2003/04/13/disable-button-after-first-click/#comment-9728</guid>
		<description>johnny B - The only thing more to it than that is sending the the submit button's name/value pair to the server (your example doesn't do that).

Below is what I came up with...

&#60;input type=hidden id=hidden1&#62;&#60;input type=submit onclick="this.disabled=true;hidden1.name=this.name;hidden1.value=this.value;this.form.submit()" name=send value=Send&#62;
</description>
		<content:encoded><![CDATA[<p>johnny B - The only thing more to it than that is sending the the submit button&#8217;s name/value pair to the server (your example doesn&#8217;t do that).</p>
<p>Below is what I came up with&#8230;</p>
<p>&lt;input type=hidden id=hidden1&gt;&lt;input type=submit onclick=&#8221;this.disabled=true;hidden1.name=this.name;hidden1.value=this.value;this.form.submit()&#8221; name=send value=Send&gt;</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Pit</title>
		<link>http://www.scriptygoddess.com/archives/2003/04/13/disable-button-after-first-click/#comment-9726</link>
		<dc:creator>Pit</dc:creator>
		<pubDate>Tue, 30 Nov 1999 00:00:00 +0000</pubDate>
		<guid isPermaLink="false">http://www.scriptygoddess.com/archives/2003/04/13/disable-button-after-first-click/#comment-9726</guid>
		<description>&#60;script language="Javascript"&#62; 
&#60;!-- 
function Disable(form) { 
if (document.getElementById) { 
for (var i = 0; i &#60; form.length; i++) { 
if (form.elements[i].type.toLowerCase() == "submit") 
form.elements[i].disabled = true; 
} 
} 
return true; 
} 
//--&#62; 
&#60;/script&#62; 

then add this in the &#60;form onSubmit="Disable(this);" action="blah" post="blah"&#62;</description>
		<content:encoded><![CDATA[<p>&lt;script language=&#8221;Javascript&#8221;&gt;<br />
&lt;!&#8211;<br />
function Disable(form) {<br />
if (document.getElementById) {<br />
for (var i = 0; i &lt; form.length; i++) {<br />
if (form.elements[i].type.toLowerCase() == &#8220;submit&#8221;)<br />
form.elements[i].disabled = true;<br />
}<br />
}<br />
return true;<br />
}<br />
//&#8211;&gt;<br />
&lt;/script&gt; </p>
<p>then add this in the &lt;form onSubmit=&#8221;Disable(this);&#8221; action=&#8221;blah&#8221; post=&#8221;blah&#8221;&gt;</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: James</title>
		<link>http://www.scriptygoddess.com/archives/2003/04/13/disable-button-after-first-click/#comment-9725</link>
		<dc:creator>James</dc:creator>
		<pubDate>Tue, 30 Nov 1999 00:00:00 +0000</pubDate>
		<guid isPermaLink="false">http://www.scriptygoddess.com/archives/2003/04/13/disable-button-after-first-click/#comment-9725</guid>
		<description>The button code seems to be gone from my post...anyway, e-mail me if you want it.</description>
		<content:encoded><![CDATA[<p>The button code seems to be gone from my post&#8230;anyway, e-mail me if you want it.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: James</title>
		<link>http://www.scriptygoddess.com/archives/2003/04/13/disable-button-after-first-click/#comment-9724</link>
		<dc:creator>James</dc:creator>
		<pubDate>Tue, 30 Nov 1999 00:00:00 +0000</pubDate>
		<guid isPermaLink="false">http://www.scriptygoddess.com/archives/2003/04/13/disable-button-after-first-click/#comment-9724</guid>
		<description>Here's code to prevent double-clicking that works, even with Netscape 4:

Insert between &#60;head&#62;&#60;/head&#62; tags:

&#60;script type="text/javascript"&#62;

/*
Block multiple form submission script- By JavaScriptKit.com
Visit http://www.javascriptkit.com for this script and more
This notice must stay intact for use
*/

//Enter error message to display if submit button has been pressed multiple times below.
//Delete below line if you don't want a message displayed:

var formerrormsg="You&#92;'ve attempted to submit the form multiple times.&#92;n Please reload page if you need to resubmit form."

function checksubmit(submitbtn){
submitbtn.form.submit()
checksubmit=blocksubmit
return false
}

function blocksubmit(){
if (typeof formerrormsg!="undefined")
alert(formerrormsg)
return false
}

&#60;/script&#62;


Button:

&#60;input type="Submit" name="-nothing" onClick="return checksubmit(this)" value=" S U B M I T "&#62;


I always laugh when I see a Javascript that only supports Internet Explorer. Then these same people wonder what's going on when people with older browsers try to use their site. I simply *will not* use a Javascript unless I can get it to work with NN4 and higher. In many cases, you can keep Google'ing until you find a solution.</description>
		<content:encoded><![CDATA[<p>Here&#8217;s code to prevent double-clicking that works, even with Netscape 4:</p>
<p>Insert between &lt;head&gt;&lt;/head&gt; tags:</p>
<p>&lt;script type=&#8221;text/javascript&#8221;&gt;</p>
<p>/*<br />
Block multiple form submission script- By JavaScriptKit.com<br />
Visit <a href="http://www.javascriptkit.com" rel="nofollow">http://www.javascriptkit.com</a> for this script and more<br />
This notice must stay intact for use<br />
*/</p>
<p>//Enter error message to display if submit button has been pressed multiple times below.<br />
//Delete below line if you don&#8217;t want a message displayed:</p>
<p>var formerrormsg=&#8221;You&#92;&#8217;ve attempted to submit the form multiple times.&#92;n Please reload page if you need to resubmit form.&#8221;</p>
<p>function checksubmit(submitbtn){<br />
submitbtn.form.submit()<br />
checksubmit=blocksubmit<br />
return false<br />
}</p>
<p>function blocksubmit(){<br />
if (typeof formerrormsg!=&#8221;undefined&#8221;)<br />
alert(formerrormsg)<br />
return false<br />
}</p>
<p>&lt;/script&gt;</p>
<p>Button:</p>
<p>&lt;input type=&#8221;Submit&#8221; name=&#8221;-nothing&#8221; onClick=&#8221;return checksubmit(this)&#8221; value=&#8221; S U B M I T &#8220;&gt;</p>
<p>I always laugh when I see a Javascript that only supports Internet Explorer. Then these same people wonder what&#8217;s going on when people with older browsers try to use their site. I simply *will not* use a Javascript unless I can get it to work with NN4 and higher. In many cases, you can keep Google&#8217;ing until you find a solution.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Terry</title>
		<link>http://www.scriptygoddess.com/archives/2003/04/13/disable-button-after-first-click/#comment-9723</link>
		<dc:creator>Terry</dc:creator>
		<pubDate>Tue, 30 Nov 1999 00:00:00 +0000</pubDate>
		<guid isPermaLink="false">http://www.scriptygoddess.com/archives/2003/04/13/disable-button-after-first-click/#comment-9723</guid>
		<description>&#60;script type="text/javascript"&#62; 
// &#60;!--  This will allow edit checking, and still disable the Submit button    
                     
function form_control(theForm)
{                                
                                      
&#160;&#160;        if ( theForm.first_name.value.length == 0 ) {
&#160;&#160;                  alert( 'Please Enter First Name .' );     
&#160;&#160;                  theForm.first_name.focus();    
&#160;&#160;                  return false;                                       
&#160;&#160;          }
&#160;&#160;          // etc... more edit checking here                                
document.getElementById('once').disabled=true;                                
theForm.submit();                                                                  
return true;                                                                            
}                                                                                            
                                                                                                  
--&#62;                                                                                                 
&#60;/script&#62;                                                                                             
&#60;?php                                                                                                         
                                                                                                                      
echo "&#60;form name='".&#36;form_name."' action='".&#36;form_action."' method='post' onSubmit='return form_control(this);'&#62;";   

// form contents go here....
                                 
echo "&#60;center&#62;&#60;input type='submit' value='". &#36;submit_msg ."' id=&#92;"once&#92;"  /&#62;&#60;/center&#62;&#92;n
        &#60;/form&#62;"; //&#60;/td&#62;&#60;/tr&#62;&#60;/table&#62;";   // "Save Changes"                          
?&#62;</description>
		<content:encoded><![CDATA[<p>&lt;script type=&#8221;text/javascript&#8221;&gt;<br />
// &lt;!&#8211;  This will allow edit checking, and still disable the Submit button    </p>
<p>function form_control(theForm)<br />
{                                </p>
<p>&nbsp;&nbsp;        if ( theForm.first_name.value.length == 0 ) {<br />
&nbsp;&nbsp;                  alert( &#8216;Please Enter First Name .&#8217; );<br />
&nbsp;&nbsp;                  theForm.first_name.focus();<br />
&nbsp;&nbsp;                  return false;<br />
&nbsp;&nbsp;          }<br />
&nbsp;&nbsp;          // etc&#8230; more edit checking here<br />
document.getElementById(&#8217;once&#8217;).disabled=true;<br />
theForm.submit();<br />
return true;<br />
}                                                                                            </p>
<p>&#8211;&gt;<br />
&lt;/script&gt;<br />
&lt;?php                                                                                                         </p>
<p>echo &#8220;&lt;form name=&#8217;&#8221;.&#36;form_name.&#8221;&#8216; action=&#8217;&#8221;.&#36;form_action.&#8221;&#8216; method=&#8217;post&#8217; onSubmit=&#8217;return form_control(this);&#8217;&gt;&#8221;;   </p>
<p>// form contents go here&#8230;.</p>
<p>echo &#8220;&lt;center&gt;&lt;input type=&#8217;submit&#8217; value=&#8217;&#8221;. &#36;submit_msg .&#8221;&#8216; id=&#92;&#8221;once&#92;&#8221;  /&gt;&lt;/center&gt;&#92;n<br />
        &lt;/form&gt;&#8221;; //&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;&#8221;;   // &#8220;Save Changes&#8221;<br />
?&gt;</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Jake</title>
		<link>http://www.scriptygoddess.com/archives/2003/04/13/disable-button-after-first-click/#comment-9722</link>
		<dc:creator>Jake</dc:creator>
		<pubDate>Tue, 30 Nov 1999 00:00:00 +0000</pubDate>
		<guid isPermaLink="false">http://www.scriptygoddess.com/archives/2003/04/13/disable-button-after-first-click/#comment-9722</guid>
		<description>Great! Thanks for the help on this one!</description>
		<content:encoded><![CDATA[<p>Great! Thanks for the help on this one!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Michael Hanscom</title>
		<link>http://www.scriptygoddess.com/archives/2003/04/13/disable-button-after-first-click/#comment-9719</link>
		<dc:creator>Michael Hanscom</dc:creator>
		<pubDate>Tue, 30 Nov 1999 00:00:00 +0000</pubDate>
		<guid isPermaLink="false">http://www.scriptygoddess.com/archives/2003/04/13/disable-button-after-first-click/#comment-9719</guid>
		<description>&lt;blockquote&gt;As it stated in the article I linked to - "This tip works for IE and N6"&lt;/blockquote&gt;

Oh &#8212; you mean I'm actually supposed to &lt;em&gt;read&lt;/em&gt; these things, instead of just clicking wildy, then coming back here to whine?

;)

Somehow I missed that line while I was reading it. Hrmpf. Guess I'll just slink back to my own little corner of the web now...(sheepish grin).</description>
		<content:encoded><![CDATA[<blockquote><p>As it stated in the article I linked to - &#8220;This tip works for IE and N6&#8243;</p></blockquote>
<p>Oh &mdash; you mean I&#8217;m actually supposed to <em>read</em> these things, instead of just clicking wildy, then coming back here to whine?<br />
 <img src='http://www.scriptygoddess.com/wp-includes/images/smilies/icon_wink.gif' alt=';)' class='wp-smiley' /><br />
Somehow I missed that line while I was reading it. Hrmpf. Guess I&#8217;ll just slink back to my own little corner of the web now&#8230;(sheepish grin).</p>
]]></content:encoded>
	</item>
</channel>
</rss>

<!-- Dynamic Page Served (once) in 0.323 seconds -->
