W3C home > Mailing lists > Public > whatwg@whatwg.org > January 2010

[whatwg] [Input type=submit] "Disable" after submitting

From: Adam Shannon <ashannon1000@gmail.com>
Date: Tue, 26 Jan 2010 07:40:15 -0600
Message-ID: <3c4f8cda1001260540sb31f2d9o59dcee5c97c0b9c3@mail.gmail.com>
I'm sure you know this, but there is always this simple way.

<input type="submit" value="Submit" onclick="this.disable=true;" />

On Tue, Jan 26, 2010 at 04:20, Randy Drielinger <Randy at prowebdesign.nl> wrote:
> Hi all,
>
> Bit of a crazy subject, but let me enlighten:
>
> Currently the submit button is used to submit a form once (more than average
> purpose). In some occassions it's possible to submit a form twice, and get
> it processed twice by the webserver, resulting in a double submit (e.g.
> forum post). For this specific example, it isn't desired bahavior.
>
> Should there be a way to prevent a (submit) button in HTML to be clicked
> more than once or is this clearly a behavior (and therefore be solved with
> JS)?
>
>
> Regards



-- 
Adam Shannon
 Web Developer
 http://ashannon.us
Received on Tuesday, 26 January 2010 05:40:15 UTC

This archive was generated by hypermail 2.4.0 : Wednesday, 22 January 2020 16:59:20 UTC