You could do this with JavaScript. Create a function between your head tags
that looks something like this:
<script language="javascript">
function submitForm(form){
form.submit();
form.theButton.value="submitting...";
var elements = form.elements;
for (var i=0;i<elements.length;i++) {
elements[i].disabled=true;
}
}
</script>
Then change your form tag to include an onSubmit attribute like this:
<form id="myForm" name="myForm" action="/path/to/formHandler.cfm"
onSubmit="submitForm(this);return false;">
<input type="text" />
<input type="submit" name="theButton" value="submit results" />
</form>
When the form's submitted the script will run, disable all the form inputs and
change the button text to "submitting...".
Hope that helps
Nick
> Hi Folks,
>
> Using CF8:
>
> I have a results entry form and if the user hits submit more than once
> the result is submitted more than once, how would I stop the user
> being able to submit more than once..
>
> Yes I know a real newbie question :)
>
> Thanks for any feedback you can give.
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Create robust enterprise, web RIAs.
Upgrade to ColdFusion 8 and integrate with Adobe Flex
http://www.adobe.com/products/coldfusion/flex2/?sdid=RVJP
Archive:
http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:293556
Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4