Answer the question
In order to leave comments, you need to log in
How to display modal window after page reload in Bootstrap?
There is a page. It has a form on it.
After submitting the form, the page is reloaded and a message about the status of the completed form is displayed (an error in filling in some field, or a success message).
How can I display this message in a modal window? What container to wrap it in?
Example
<button type="button" class="btn btn-primary" data-toggle="modal" data-target=".bs-example-modal-sm">Small modal</button>
<div class="modal fade bs-example-modal-sm" tabindex="-1" role="dialog" aria-labelledby="mySmallModalLabel" aria-hidden="true">
<div class="modal-dialog modal-sm">
<div class="modal-content">
...
</div>
</div>
</div>
Answer the question
In order to leave comments, you need to log in
$('.modal').modal('show');
Opening a modal window. After reboot, call, or by clicking on the button, do e.preventDefault(); and load the modal dynamically and open it.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question