Laimonas Naradauskas
Posts: 0
Joined: Tue Apr 14, 2015 12:44 pm

Page redirect after a period of time

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

Laimonas Naradauskas
Posts: 0
Joined: Tue Apr 14, 2015 12:44 pm

Page redirect after a period of time

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.

Evgene Karachevtsev
Posts: 12
Joined: Mon Apr 28, 2014 1:12 pm

Page redirect after a period of time

Hello Laimonas,

Thank you for the update, glad it works!

Laimonas Naradauskas
Posts: 0
Joined: Tue Apr 14, 2015 12:44 pm

Page redirect after a period of time

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?

Laimonas Naradauskas
Posts: 0
Joined: Tue Apr 14, 2015 12:44 pm

Page redirect after a period of time

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?

Yurii Orishchuk
Posts: 0
Joined: Fri Feb 14, 2014 8:20 am

Page redirect after a period of time

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.

Return to “Issues”