- This topic has 7 replies, 4 voices, and was last updated 13 years ago by
Max87.
-
AuthorPosts
-
DougerMemberHi, I would like to be able to basically restart the app when a user presses a button. (and by restart I mean reinitialize the app, basically like it just started again) Is that possible ?
June 18, 2012 at 2:21 pm #327247
support-michaelKeymasterInteresting question… I have not thought about this before. Are you talking about an app or a mobile webapp because an app has a bootstrap stage that I would need to discuss w/ dev team?
My 1st thought is to connect a gotoURL button that simply loads the startup doc, e.g., index.html. Let us know you app type (app or webapp) and we will see what we can determine.
June 18, 2012 at 3:04 pm #327251
DougerMember@support-wayne wrote:
Interesting question… I have not thought about this before. Are you talking about an app or a mobile webapp because an app has a bootstrap stage that I would need to discuss w/ dev team?
My 1st thought is to connect a gotoURL button that simply loads the startup doc, e.g., index.html. Let us know you app type (app or webapp) and we will see what we can determine.
Hi Wayne, its a web app. I tried your first thought that without success which is why i posted. Basically there are open events I would like to re-execute only in certain circumstances (which is why I would tie to a button). I may try calling the open routine from the button and see if that works.
June 18, 2012 at 3:07 pm #327252
DougerMemberHi Wayne, just tried what I was thinking and it worked! I basically did a Run JavaScript and on the on click event called the open() routine. Thanks for getting my mind going again!
June 18, 2012 at 7:20 pm #327257
support-octavioMemberHi Douger,
That’s great. Thanks for follow up informing that you got it.
June 19, 2012 at 4:19 pm #327307
Max87MemberHello Octavio,
I have similar question – I need to restart my app after clicking the button too.
But I’d like to clear and drop the database tables and reinitialize it after clicking a button.I have a button – set function resetGame which contains code for deleting and dropping tables,. If I add window.location.reload() into resetGame, it ignores table deleting and dropping and simply reloads page. Then, duplicable entries are created.
My question, is there a option, how to know, if table exists and run another function depending on this conditional?
My goal is, how to run window.loacation after tables are deleted and dropped.
Thanks for help.June 20, 2012 at 4:05 pm #327378
support-octavioMemberHi Max,
We are investigating a couple of options for app reset and your db reinitialization problem.
June 20, 2012 at 4:12 pm #327380
Max87MemberThanks for help…
I solved my problem temporarily, that I added another button, which is hidden in the beginning, after clicking reset is executed resetGame function(tables are deleted) and the Reset button fades to new button, which has window.location.reload set on click…It’s not perfect solution, but it works(it creates strange graphics errors such as main toolbar is hidden etc – I will work on it later).
Anyway, if you come with better solution, I will be happy to use it.
Thanks. -
AuthorPosts