ColdFusion

HTML: How to Disable the Submit Button After Submit

Solution

<script type="text/javascript">
	function disableFormElements(form){
		setTimeout(function(){
			for (var i=0; i<form.elements.length; i++) 
			    form.elements[i].disabled = true;
		}, 1);
	}	
 
<form name="formName" action="page.xsp?p1=1&p2=2" method="post" 
onsubmit="if (!ClientValidation()) return false; disableFormElements(this)">

Read further for the explanation.

Syndicate content