2017 © Pedro Peláez
 

library js-submitonce

Protects forms to be submitted twice

image

dynasource/js-submitonce

Protects forms to be submitted twice

  • Saturday, May 13, 2017
  • by dynasource
  • Repository
  • 1 Watchers
  • 0 Stars
  • 5 Installations
  • 0 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 2 Versions
  • 0 % Grown

The README.md

Vanilla JS form submit once protection

Forms usually need to be submitted once., (*1)

When double submission does occur (i.e. because of double clicking), unwanted side effect can occur: * duplication of records in a database * multiple actions such as i.e. sending duplicate emails * thrown exceptions as systems could not expect certain actions to be executed twice, (*2)

This "Js-SubmitOnce" script is a plain JS vanilla script to prevent this undesired behavior., (*3)

Installation

Installation is done by composer, requiring:, (*4)

```json { "require": { "dynasource/js-submitonce" : "*" } }, (*5)


Include it in your webpage with: ```js window.addEventListener('load', function () { new SubmitOnce({ 'selector': 'btn' }); });

The Versions

13/05 2017

dev-master

9999999-dev http://www.dynasource.eu/

Protects forms to be submitted twice

  Sources   Download

BSD-3-Clause

js forms vanilla

13/05 2017

0.1

0.1.0.0 http://www.dynasource.eu/

Protects forms to be submitted twice

  Sources   Download

BSD-3-Clause

js forms vanilla