If you're using jquery you can drop this in a master page:

$(document).ready(function() {
  $('form').submit(function(e) {
    $(e.target).find('input[type=submit]').attr('disabled', 'true');
  }
});

Now any form that gets submitted, it's submit button will get disabled
immediately. We use a similar technique currently to turn the button into a
wait icon and to overlay a mask on the form


Michael M. Minutillo
Indiscriminate Information Sponge
Blog: http://wolfbyte-net.blogspot.com


On Fri, Jul 30, 2010 at 7:13 AM, David Connors <[email protected]> wrote:

> On 30 July 2010 08:54, Dylan Tusler <[email protected]
> > wrote:
>
>>  At first I thought you were pulling a Friday funny on me.
>>
>
> I get that a lot. :)
>
>
>> But I do see your point, having properly read your post now.
>>
>
> I don't get that a lot.
>
>
>> I think, in our case, the web form is a very long way away from the
>> database, and after submission we go through a few human workflow steps
>> involving assessing and validating the submissions before it gets anywhere
>> near our DB, so I might just stick with JavaScript for the moment.
>> Double-submission is more of an annoyance than a peril in our situation.
>>
>> Here's what I've gone with (because I lurve C# and hate JavaScript)
>>
>> btnSubmit.Attributes.Add("onclick", "this.disabled=true;");
>>
>> in the form OnLoad.
>>
>
> If you're writing an intranet app (I kind of get the feeling you are) then
> it probably isn't so much of an issue because you have a support
> relationship with your users + known platform/security policy. If you're
> writing something facing the Internet, especially e-commerce, then I
> wouldn't be writing anything that depends on script at all (unless you want
> to lose a large single digit percentage of users/sales and a chunk of the
> public sector).
>
> Every time I see a javascript pop up like "YOUR TRANSACTION WILL TAKE 45
> SECONDS TO PROCESS - DO NOT CLICK SUBMIT AGAIN!!!!" my inner child software
> engineer cries.
>
> David.
>
> --
> *David Connors* | [email protected] | www.codify.com
> Software Engineer
> Codify Pty Ltd
> Phone: +61 (7) 3210 6268 | Facsimile: +61 (7) 3210 6269 | Mobile: +61 417
> 189 363
> V-Card: https://www.codify.com/cards/davidconnors
> Address Info: https://www.codify.com/contact
>
>

Reply via email to