Answer the question
In order to leave comments, you need to log in
How to send a POST request on a click on the "Submit" button in the bootstrap modal window before closing the modal window?
How to send a POST request on a click on the "Submit" button in the bootstrap modal window before closing the modal window?
If you override the class on click to which a POST request is sent to any other element in the DOM, then it is sent, and if you bind it to the "Submit" button of the modal window, which closes the modal window itself, then the POST request is not sent.
Here is the code I use:
jsfiddle.net/hufcpuss
Answer the question
In order to leave comments, you need to log in
so you have an ajax transfer, and submit to submit the form with a reload of the jii.
Just make a link with the .send-email class and then write in the script to hide the modal
jsfiddle.net/hufcpuss/2 Give the
id to the form, track the submit, override the standard submit with e.preventDefault() , and send the data via ajax.
On success or error, hide the modal with .modal("hide").
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question