Effects click submit and entire form after submitting?


Warning: count(): Parameter must be an array or an object that implements Countable in /home/styllloz/public_html/qa-theme/donut-theme/qa-donut-layer.php on line 274
0 like 0 dislike
16 views
Hi!
Please help me to understand! Not smart enough to finish the job.
Almost ready time to JsFiddle

This:
- Sending form data with a hidden technical information field.
- Block-message about successful sending of message.
- Check input text for data, if empty - the submit button is inactive.
- The submit button when pressed becomes inactive so as not poked a thousand times.

Questions:
1) How to temporarily disable button (disable) and change the name to "Sent" on the submit button, say 3 seconds, by using onclick="script" inside the button?
Because on the page there are several similar buttons and afraid all at once will be disconnected if it is specified in General script.

2) How to register another script in the onclick on the submit, so she prescribed a specific value in the technical text hidden field? Because when you send collect these technical fields in order to distinguish which form has been sent.

3) How to Ajax submit a form at the end of the script to smoothly hide the form and instead open the message? Just after 1-2 seconds until the button is inactive. I understand there is removeAttr and attr classes to the form.
by | 16 views

1 Answer

0 like 0 dislike
We hang the handler on the onsubmit event of the form (you already have). In the beginning we put the button disable and change the text, set the value in the technical field, then send the request to the server. When the query completes, restore the button to its previous state (in your case JQuery's Ajax method is complete), hide the form, display the desired message (methods fadein and fadeout option slow)
by

Related questions

0 like 0 dislike
1 answer
0 like 0 dislike
2 answers
0 like 0 dislike
2 answers
0 like 0 dislike
1 answer
0 like 0 dislike
2 answers
110,608 questions
257,187 answers
0 comments
40,796 users