Paul Medawar
Posts: 0
Joined: Thu Apr 03, 2014 10:55 am

Stopping Resume Event

Hi,

if the "resume" event is used to invoke a service on a page, does that mean the service will be invoked every time the app is resumed after that?

I have an app with three pages. I want to run the "resume" event to invoke a service on page 2, but I don't want it to continue to fire on resuming when in page 1 or Page 3.

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

Stopping Resume Event

Hello Paul,

Please add that function to the page2 for that

Paul Medawar
Posts: 0
Joined: Thu Apr 03, 2014 10:55 am

Stopping Resume Event

Hi Serhii,

I have added the function on to page 2 and it works great. However, after navigating from page 2, to page 1 or 3, the function is still firing on resume. How can I stop it and make sure it only fires on page 2?

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

Stopping Resume Event

You can check the active page with JS and run that function if the pageName = Page2. Please use JS below:preif($($(".ui-page-active")[0]).attr("id")==="Page2"){
alert("test");
}/pre

Paul Medawar
Posts: 0
Joined: Thu Apr 03, 2014 10:55 am

Stopping Resume Event

Hi Serhii,

just came back to this and it worked perfectly, thanks!

Return to “Issues”