Is it possible in Bootstrap 3 to open modal from another modal? I have modal windows with content loaded from external html files.
- I'm opening the modal window. There I have a form to submit.
- After clicking the submit button I would like to go to the next step with a new modal window (and a new content from another html file).
As far as I know you can't have two modal windows simultaneously, so I have to close the first modal and then open the second one. The problem is I have to do after clicking the submit button in the first modal.
I've tried to use the data-dismiss="modal"
with data-toggle="modal"
attributes on the submit button but they only hide the first modal, the background in still dark and nothing happens.
Is it possible in Bootstrap 3 to open modal from another modal? I have modal windows with content loaded from external html files.
- I'm opening the modal window. There I have a form to submit.
- After clicking the submit button I would like to go to the next step with a new modal window (and a new content from another html file).
As far as I know you can't have two modal windows simultaneously, so I have to close the first modal and then open the second one. The problem is I have to do after clicking the submit button in the first modal.
I've tried to use the data-dismiss="modal"
with data-toggle="modal"
attributes on the submit button but they only hide the first modal, the background in still dark and nothing happens.
1 Answer
Reset to default 15you can use http://jschr.github.io/bootstrap-modal/bs3.html for that; check stackable example.
data-target
attribute, have you used that? .. try addingdata-target='#(id of the modal div)'
to the close button. – brainless coder Commented May 29, 2014 at 10:27<button class="uploadSection__addBox col-lg-12 col-md-12 col-sm-12 col-xs-12" data-dismiss="modal" data-toggle="modal" href="upload1b.html" data-target=".popModal">
– user3553682 Commented May 29, 2014 at 10:31.popModal
– brainless coder Commented May 29, 2014 at 10:38$("...").modal('show');
or$("...").modal('hide');
check here - getbootstrap.com/javascript/#modals-usage – brainless coder Commented May 29, 2014 at 11:00