Page 1 of 1

Page redirect after a period of time

Posted: Tue Apr 14, 2015 12:44 pm
by Laimonas Naradauskas

How to set up the splash screen to redirect to a page (inside appery) after a period of time?


Page redirect after a period of time

Posted: Tue Apr 14, 2015 1:12 pm
by Laimonas Naradauskas

Found an answer by myself. If anyone will be stuck with this just look at the following code:
$(document).ready(function () {

Code: Select all

     if ($("#splashScreen_splash_background").length  0) { 
     window.setTimeout(function () { 
         location.href = "menu.html"; 
     }, 3000); 
 } 

});

jQuery driven example, I have an image with id: splashScreen_splash_background on the splash screen, if it exists then redirect url to the menu (predefined page that I have already created) after 3000 ms.

Thanks.


Page redirect after a period of time

Posted: Tue Apr 14, 2015 1:41 pm
by Evgene Karachevtsev

Hello Laimonas,

Thank you for the update, glad it works!


Page redirect after a period of time

Posted: Tue Apr 14, 2015 2:25 pm
by Laimonas Naradauskas

Although there is still issues on android interface as the system can't seem to find menu.html. Are the files rendered differently on platforms? Should I call some other page?


Page redirect after a period of time

Posted: Wed Apr 15, 2015 11:01 am
by Laimonas Naradauskas

Although there is still issues on android interface as the system can't seem to find menu.html. Are the files rendered differently on platforms? Should I call some other page?


Page redirect after a period of time

Posted: Thu Apr 16, 2015 2:40 am
by Yurii Orishchuk

Hi Laimonas,

Unfortunatly you can not use codelocation.href = "menu.html&quot/code code to navigate to pages.

Please try following one:

precode

$(document).ready(function () {

Code: Select all

if ($("#splashScreen_splash_background").length > 0) {  
   window.setTimeout(function () {  
      Apperyio.navigateTo("menu"); 
      //location.href = "menu.html&quot  
}, 3000);  

}
});

/code/pre

Regards.