📜 ⬆️ ⬇️

The "send" button. Simple and useful.

It is enough just to improve the usability of the form in a simple but extremely effective way - deactivating the “send” button after pressing it.

In order not to be unfounded, I will give an example for jQuery:

$('#id_').click(function()
{
$('this').attr('disabled', 'disabled')
}
);


Ideally, the button should become active only after the form is fully valid.
')
As the nooze prompted Habrapheater, it’s worth considering that in the case of AJAX response to sending, you should take into account errors (for example, a username and password that do not match, or a request timeout)

PS> Perhaps, the topic has already been raised, but I did not find any references to it.
PPS> Thank you for shitting karma, you are good people :)
PPPS> I do not accept the model Habra, in which the author puts everything and everyone in the top, in this case there is simply nothing to discuss.

Source: https://habr.com/ru/post/44145/


All Articles