Page 1 of 1

Load event on "NavigtionToPage".

Posted: Fri May 30, 2014 12:32 pm
by Himanshu

Hello Team,

My question is a bit similar to this question, However I didn't get my answer from it.

https://getsatisfaction.com/apperyio/...

My question is -

If I have two pages -
Screen1 and Screen2. And my starting page of this app is "Screen1", and there is a button on this page to navigate to "Screen2".
On "Screen2", I have a button, and on its NavigateToPage event, I am returning to "Screen1", here "Screen1" load event doesn't call, so my values in input box and all will be there.

Now, I have three pages.. "StartScreen", "Screen1" and "Screen2".. And initial page is "StartScreen", and there is a button on this page to NavigaeToPage to "Screen1", and rest are same... But now if we are on "Screen2" (we came here from "Screen1") and button's NavigateToPage event, we come to "Screen1", but here page's "Load" event also call along with "PageShow" event.
Can you please explain it why???

I am sharing public link of app..

http://appery.io/app/mobile-frame?src...

And for testing.. When you come on "Screen1", then fill name in it, and click the button to reach "Screen2", then when you click button on "Screen2", why "load" event call, and "Name" text get blank..

Please help.


Load event on "NavigtionToPage".

Posted: Fri May 30, 2014 1:34 pm
by Kateryna Grynko

Hi Himanshu,

Appery.io application always stores 2 pages: start screen and the current one.

If you navigate further, start screen remains, while the current is replaced with the new value.

If you then navigate to the previous one it will be loaded again (Load event fires).


Load event on "NavigtionToPage".

Posted: Fri May 30, 2014 5:23 pm
by Himanshu

Then what we can do to keep values on "Page1", when it loads with Back Button (Navigate To Page) on "Page2".


Load event on "NavigtionToPage".

Posted: Fri May 30, 2014 7:52 pm
by Evgene Karachevtsev

Hello Himanshu,

You can save values from UI components to localStorage variables before navigation from your page and then on "load" event on this page restore them from localStorage variable to UI components


Load event on "NavigtionToPage".

Posted: Tue Jun 03, 2014 10:24 am
by Himanshu

Hi Katya, Please give me any suggestion in this case.

My starting page is "LogIn page", and on this page I want to prevent the user to use device "Back" button, and if I write any code on this page, then it reflects to all of the pages on their "Back button", how to handle this?


Load event on "NavigtionToPage".

Posted: Tue Jun 03, 2014 10:25 am
by Himanshu

Thanks Evgene, I managed to work with localStorage variables. But I had to call my web-service again on back button (NavigateToPage).


Load event on "NavigtionToPage".

Posted: Tue Jun 03, 2014 8:17 pm
by Kateryna Grynko

Hi Himanshu,

Why can't you use Page Show event? Do you want to invoke a service on the page you leave? You can add a Click event handler on Back button:pre$("role='button'").on("click", function(){
// any JS code you need
});/pre