- This topic has 7 replies, 4 voices, and was last updated 12 years, 6 months 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 ?
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.
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.
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!
support-octavioMemberHi Douger,
That’s great. Thanks for follow up informing that you got it.
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.
support-octavioMemberHi Max,
We are investigating a couple of options for app reset and your db reinitialization problem.
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