Page 1 of 1

Close popup and open new popup

Posted: Wed Dec 21, 2016 4:30 pm
by Deon

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.


Close popup and open new popup

Posted: Wed Dec 21, 2016 8:25 pm
by Serhii Kulibaba

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


Close popup and open new popup

Posted: Thu Dec 22, 2016 11:18 am
by Deon

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


Close popup and open new popup

Posted: Thu Dec 22, 2016 8:12 pm
by Serhii Kulibaba

Yes, please leave a close popup action


Close popup and open new popup

Posted: Mon Jan 09, 2017 11:20 am
by Deon

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