- This topic has 19 replies, 3 voices, and was last updated 11 years, 10 months ago by support-octavio.
-
AuthorPosts
-
appmosMemberI´m using this code:
setInterval(function(){phoneui.gotoPage('screen2', FADE)},3000);
But not works. What´s wrong?
Thanks
support-octavioMemberHi appmos,
Please try replacing by this:
setInterval(function(){phoneui.gotoPage('m1-screen2', "FADE")},3000);
appmosMemberHi Octavio.
The screen has not changed. I’ll see the result on the test center, right?
Thanks
support-octavioMemberHi appmos,
>The screen has not changed. I’ll see the result on the test center, right?
Yes, you will see it there.Q: are you adding your “scree2.mobi” as an additional project file? If no, please do it. ( See http://www.genuitec.com/mobile/docs/highlights/current/#sec4a )
appmosMemberI added the screen but still does not work. Now I see the background image of the screen2 in splash Screen2
Code:
<script> function splash() { setInterval(function(){phoneui.gotoPage('m1-screen2', "FADE")},3000); } </script>
body onload="splash()">
One doubt> I need to add the screens in my first screen (splash screen) right?
support-octavioMemberHi appmos,
To avoid modify the generated html file, I suggest you put the code above on the phoneui.documentReadyHandler function in custom.js file.
appmosMemberHi Octavio
I do not know how to include the code on this page. Could you help me?
Thanks
support-octavioMemberHi appmos,
You can use either any text editor or the one is included within Test Center. See http://www.genuitec.com/mobile/docs/workingWithGeneratedFiles/workingWithGeneratedFiles.html#editing_javascript
appmosMemberHi Octavio
I don´t know how the code should be.
In this way?
phoneui.gotoScreen('contacts-screen', 'FADE')
support-octavioMemberHi appmos,
According next doc I suspect the name to call your second screen is m1-contacts_screen. So your code should be something like this:
setInterval(function(){phoneui.gotoPage('m1-contacts_screen', "FADE")},3000);
appmosMemberSo just like the function I had prepared in html.
It worked, but the other application screens are also being affected: when access another screen after 03 seconds returns to the screen that I determined in the code.
What should I do so that only the splash screen go to the main screen?
Thanks
support-octavioMemberHi appmos,
You can try with setTimeout() with this your function will be called only one time.
setTimeout(function(){phoneui.gotoPage('m1-contacts_screen', "FADE")},3000);
Let me know how it goes for you.
appmosMemberGreat! It worked very well. Now there is the possibility of generating splash screen for Android too. Thank you, Octavio.
badal405MemberYou can use either any text editor or the one is included within Test Center. See http://www.genuitec.com/mobile/docs/workingWithGeneratedFiles/workingWithGeneratedFiles.html#editing_javascript
Hi Octavio,
I follow the above link and write the code as
setInterval(function(){phoneui.gotoPage(‘LoginForm.mobi’, “FADE”)},3000);
just above of
phoneui.documentReadyHandler = function() {}
but still not working. BTW, i have two separate screen not page. So “gotoPage” is it the appropriate function for open new screen?
Waiting for your reply.
Thanks and regards.
badal405Member@appmos wrote:
So just like the function I had prepared in html.
It worked, but the other application screens are also being affected: when access another screen after 03 seconds returns to the screen that I determined in the code.
What should I do so that only the splash screen go to the main screen?
Thanks
Could you please tell me where you have written the function and where you call the function?
-
AuthorPosts