On 5/17/19 10:49 AM, Tanstaafl wrote: > On 5/15/2019, 4:56:22 PM, Mark Sapiro <m...@msapiro.net> wrote: >> I've seen lots of sites, mostly having to do with purchasing or donating >> money that warn you that clicking whatever more than once will result in >> a duplicate charge. >> >> If you really think this is a bug in HyperKitty rather than a bug in >> your browser or just user error, how do you suggest we fix it. > I've always wondered about this. > > It seems to me that code could be written to put the interface in somce > kind of state where it wouldn't accept another click once a successful > click > transaction had been initiated. > > Maybe there are technical reasons this isn't as easy as it sounds like > it would be?
The only real solution that I can think of would require javascript code that would on pressing the button, make the button now unpressable, and then submit the page. One issue with this is that if javascript isn't enabled, the page may be unusable as the button now requires javascript to do anything, and while javascript is largely usable, some browsers still don't support it, and many users intentionally disable it. I suppose you could have some javascript on the page that, if javascript is enabled, changes the button to use the javascript to disable it, and if javascript is disabled it works as current (where two presses cause the problem). The only other solution I can think of would be to give each page served a unique id, and remember all the unique ids that have sent you a request 'recently', and do something about repeats (and figure out how long recent might need to be), the bigest issue here is that almost by definition, the earlier request is still 'in process' (as the user still has the old page), so you are dealing with a 'race' condition, and may create a bigger delay in order to try and handle the issue. -- Richard Damon _______________________________________________ Mailman-Developers mailing list -- mailman-developers@python.org To unsubscribe send an email to mailman-developers-le...@python.org https://mail.python.org/mailman3/lists/mailman-developers.python.org/ Mailman FAQ: https://wiki.list.org/x/AgA3 Security Policy: https://wiki.list.org/x/QIA9