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?
Catch up wih the Appery.io community on our forum. Here you'll find information on the lastest questions and issues Appery.io developers are discussing.
https://forum.appery.io/
How to set up the splash screen to redirect to a page (inside appery) 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.
Hello Laimonas,
Thank you for the update, glad it works!
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?
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?
Hi Laimonas,
Unfortunatly you can not use codelocation.href = "menu.html"/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"
}, 3000);
}
});
/code/pre
Regards.