Hawk
Posts: 0
Joined: Mon Aug 04, 2014 11:23 am

Popup shows randomly in different pages

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?

Kateryna Grynko
Posts: 0
Joined: Thu Nov 15, 2012 9:13 am

Popup shows randomly in different pages

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.

Hawk
Posts: 0
Joined: Mon Aug 04, 2014 11:23 am

Popup shows randomly in different pages

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?

Kateryna Grynko
Posts: 0
Joined: Thu Nov 15, 2012 9:13 am

Popup shows randomly in different pages

Hi Hawk,

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

Hawk
Posts: 0
Joined: Mon Aug 04, 2014 11:23 am

Popup shows randomly in different pages

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?

Kateryna Grynko
Posts: 0
Joined: Thu Nov 15, 2012 9:13 am

Popup shows randomly in different pages

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.

Return to “Issues”