pecu / SCoin

Soochow University Coin (IOTA)

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Prevent race condition and make operation atomic

StillFantastic opened this issue · comments

e.g. potential race condition when trying to send token.

We could disable the submit button, like in Zhushan as below:

  <script>
     $(document).ready(function () {
        $("#pay_form").submit(function (e) {
            //disable the submit button
            $("#submit").attr("disabled", true);

            return true;

        });
    });
  </script>