Page 1 of 2

Navigation to another page in application with full screen refresh.

Posted: Sun Jan 05, 2014 9:34 am
by prashant purohit

Hi,

I want to navigate to another page after 3000 ms in my first page. Also, I have to use full screen refresh on my second page while navigating. I am using the below JS code but it doesn't work:

setTimeout("Appery.navigateTo('login_screen', {transition: 'none', reloadPage: true})" , 3000);

Please suggest


Navigation to another page in application with full screen refresh.

Posted: Sun Jan 05, 2014 12:04 pm
by Igor

Hi,

How do you invoke this code? Please try to use this code on button click or screen load event. You code is correct, it works for me.


Navigation to another page in application with full screen refresh.

Posted: Sun Jan 05, 2014 1:19 pm
by prashant purohit

Hi,

There are two screens:

  1. splash_screen

  2. login_screen

    Script is executed on the "Page show" event of splash screen. Its moving to login screen after 3000 ms but full page refresh doesn't happen.

    I tried it for both Load event and button click , but the script doesn't full refresh the login_screen. Please let me know , if I need to share the project.


Navigation to another page in application with full screen refresh.

Posted: Sun Jan 05, 2014 1:34 pm
by Igor

Could you post your public app link so we can test it?


Navigation to another page in application with full screen refresh.

Posted: Sun Jan 05, 2014 1:37 pm
by prashant purohit

Navigation to another page in application with full screen refresh.

Posted: Sun Jan 05, 2014 1:41 pm
by Igor

There is a JS error. Please try to debug your app and fix the error. It could be the problem why your page doesn't refresh.


Navigation to another page in application with full screen refresh.

Posted: Sun Jan 05, 2014 2:15 pm
by prashant purohit

Hi,

I again checked it and don't thin that this is because of any JS error. These is only one JS on the splash_screen, which is the one mentioned above.

I have added a button on splash_screen and on click navigating to login_screen with "use full screen refresh". This way it works absolutely fine. However, the script at the same time doesn't work.

Request you to pls again check the link and suggest.


Navigation to another page in application with full screen refresh.

Posted: Sun Jan 05, 2014 2:41 pm
by Igor

Let's fix the JS error first. Project tab - JavaScript- Facebook_utils.js

On line 8 replace you code:
pre
if(params.indexOf('#')>=0) {
/pre
with next one:
pre
if(params.indexOf('#')=0) {
/pre
When you fix this error, Please test app one more time. Let us know about results.


Navigation to another page in application with full screen refresh.

Posted: Sun Jan 05, 2014 3:03 pm
by prashant purohit

sorry, but I couldn't understand. Both the above mentioned codes are same


Navigation to another page in application with full screen refresh.

Posted: Sun Jan 05, 2014 3:05 pm
by Igor

Sorry, copy/paste error. Your string is
precode
if(params.indexOf('#')>=0) {
/code/pre