How to implement modal inside another modal in angular-strap? - javascript

I'm using angular-strp for modal box. My requirement is i want to show the information about the page when page loads in the modal box. When user click ok on the modal box I need to close that modal and show user another modal to choose country.
i'm using ng-click on the first modal ok button to call a function to close the first modal and open another modal in that function.
Is there anyway to chain modal from opening one by closing another in angular-strap?

Related

How to Clear Modal Box DropDown and Text Box

How can I clear Modal Box after Submission of data Modal Box closes automatically but when we again open Modal Box it shows Previous submitted data.
I am Using Bootstrap Modal Box and C# Asp.net web forms.
You can reset the content at the time of modal hide.
For more detail follow this How to reset the bootstrap modal when it gets closed and open it fresh again?
You have to clear all the field before closing or opening the Model box.
https://getbootstrap.com/javascript/#modals shows an event for when a modal is hidden. Just tap into that:
Take a look on script to clear the input field or you have to do it from backends.

angularjs ui-router re-usable state in modal (modal in modal and modal in modal in modal cases)

I have two states in ui-router. A main state and a modal state. main state shows a page and is dynamic based on pageCode. modal state opens a dialog using mdDialog and it's content is dynamic too. the content is another page, that can also be opened in main state in situations. when a modal is opened, the content can also link to another page, which needs to open again in a new modal(modal in modal), which I use a global service to handle all modals.
Now the issue is when the second modal opens, since they use the same state and state parameters, the first opened modal content will also change. Is there a way to prevent this or maybe a better design approach?
Plunkr to show the issue: http://next.plnkr.co/edit/4PbnZ778Utdb27PX
When you click the open second dialog button inside the first dialog, see that the test1 in the first dialog changes to test2 right before dialog 2 opens

Display of modal popup form when users tries to close the tab instead of logout option

I'm displaying a modal popup with small feedback form whenever the user logs off from the application. But the problem is whenever the user directly closes the tab instead of logout then I want user to fill this form and then close the tab of the browser using jquery. I used window. Unload but getting alert blocked error in console.. Any alternative way to achieve display of modal window on close of tab??

Bootstrap 3 - open modal from another modal

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.
you can use http://jschr.github.io/bootstrap-modal/bs3.html for that; check stackable example.

Open Modal from Modal

I'm using twitter-bootstrap and am using the Modal JS plugin. I have a modal which is open and want to open another modal from the original modal that is open.
The reasoning, is the user can select an option from the dropdown list. If the item they want to select isn't in the list, they can click a button and add a new one.
I've tried to hide the original modal, then show the new one, but I get stuck with just showing the backdrop. When I try and open them together, the backdrop gets dark (since I've now placed another backdrop on top of the one already existing and I can still see the original modal.
Ideally I could open a modal, then open another just as easy as doing it today with one modal.
My problem was the 2nd modal was inside the file of the first, so when I hid the first, I couldn't show the 2nd one (which is why I was left with just the backdrop). I ended up just calling modal.('hide') on the first modal, then modal('show') on the 2nd.

Categories