Page 1 of 1

Popup shows randomly in different pages

Posted: Mon Sep 29, 2014 11:43 am
by Hawk

I would like to add a popup item that shows after random time (seconds) during the session. The popup should show at any page while the user is navigating throught the app. I found that the popup that I can add, can only be see in one page. Is there a way to add a global one or should I add the same popup in every page in the app and after random time fire the one that exist in the current page?


Popup shows randomly in different pages

Posted: Mon Sep 29, 2014 1:06 pm
by Kateryna Grynko

Hi Hawk,

You could replace Popup with a Dialog and add custom JavaScript code to open this dialog:preApperyio.navigateTo('Screen1', {
transition: 'pop'
} );/preWhere Screen1 is a Dialog name.


Popup shows randomly in different pages

Posted: Tue Sep 30, 2014 5:13 am
by Hawk

Thank Kateryna, the logic is working but the appearance is not the same as I expect from a popup. That is, the dialog covers the entire page behind. I want it to be of the size 90% width and 40% hight, and the page behind appears. In addition, need to add close button on the corner border. The popup I used, looks like this:

Image

Is it possible to style the dialog in the same way?


Popup shows randomly in different pages

Posted: Tue Sep 30, 2014 7:43 am
by Kateryna Grynko

Hi Hawk,

Unfortunately a Dialog can't be styled this way.
You could create similar popups for different pages.


Popup shows randomly in different pages

Posted: Wed Oct 01, 2014 1:09 am
by Hawk

Given that I have 25 pages and the popup should display an image in 1 of three languages, means I have to add 75 images to the App. Isn't there any other way?


Popup shows randomly in different pages

Posted: Wed Oct 01, 2014 10:40 am
by Kateryna Grynko

Hi Hawk,

You can write a custom JavaScript code that will add a component to a page using needed styles so it will look like popup.