Deon
Posts: 0
Joined: Sun Jun 30, 2013 6:00 am

Close popup and open new popup

Hi

I have a button inside a popup. I need the button to close its container popup and then open a new popup.

I have two events. One to close the popup and the second event to open the new popup. The new popup does not open.

I tried this in jscript with the same result.

Could you please assist.

Serhii Kulibaba
Posts: 150
Joined: Tue Aug 27, 2013 1:47 pm

Close popup and open new popup

Hello Deon,

Right after you close a popup application removes it from the DOM, so all events, which go after that event are ignored.

Please use a custom JS as a workaround below for that case:

presetTimeout(function(){
var popupElement = Apperyio("popup2");
if (popupElement.popup("option", "positionTo") === "origin") {
popupElement.popup("open", {
transition: "none",
positionTo: "#" + $(this).attr("id")
});
} else {
popupElement.popup("open", {
transition: "none"
});
};
}, 100);/pre

here popup2 - name of the popup which need to be opened

100 - a timeout in ms between closing a previous popup and opening a next one

Deon
Posts: 0
Joined: Sun Jun 30, 2013 6:00 am

Close popup and open new popup

Hi
Thank you. This does not work. Nothing happens.
Do I need to close the open popup first or is it automatically closed.?

Serhii Kulibaba
Posts: 150
Joined: Tue Aug 27, 2013 1:47 pm

Close popup and open new popup

Yes, please leave a close popup action

Deon
Posts: 0
Joined: Sun Jun 30, 2013 6:00 am

Close popup and open new popup

Sorry about the delayed response. Thank you. Works perfectly!

Return to “Issues”