D
David Alexander
I see a lot of websites where you press a submit button to place an order.
Typically, this involves credit card data in a form being submitted, passed
to some third-party validator, bank, etc. and the result coming back to the
server, then back to the client. Very often, they warn, "Don't press submit
more than once or you may be billed twice."
Perhaps I am being naive, but why don't the page designers just use
JavaScript to deactivate the button after it has been pressed? Is there a
problem tying JavaScript and Server Control events to the same control?
I just can't believe that this situation can't be handled by the software,
rather than begging the user not to misbehave. I am most familiar with
ASP.NET. I would think that you could specify, serverside, that the onclick
event for the button could fire the client event first, then the JavaScript
even that ASP.NET uses to submit the form second.
I need to do something similar for a big transaction that isn't financial,
but requires a lot of data chewing and I want the user to be unable to
double-submit. Is there something flawed with deactivating the button until
the server responds?
Typically, this involves credit card data in a form being submitted, passed
to some third-party validator, bank, etc. and the result coming back to the
server, then back to the client. Very often, they warn, "Don't press submit
more than once or you may be billed twice."
Perhaps I am being naive, but why don't the page designers just use
JavaScript to deactivate the button after it has been pressed? Is there a
problem tying JavaScript and Server Control events to the same control?
I just can't believe that this situation can't be handled by the software,
rather than begging the user not to misbehave. I am most familiar with
ASP.NET. I would think that you could specify, serverside, that the onclick
event for the button could fire the client event first, then the JavaScript
even that ASP.NET uses to submit the form second.
I need to do something similar for a big transaction that isn't financial,
but requires a lot of data chewing and I want the user to be unable to
double-submit. Is there something flawed with deactivating the button until
the server responds?