- This topic has 7 replies, 2 voices, and was last updated 10 years, 9 months ago by Brandon.
-
AuthorPosts
-
falloffalotMemberOk, so I have managed to figure out how to create a stopwatch in Mobi1 using JS (JavaScript) a very basic script for test purposes.
My only problem now is the delay!
When I run the test and use it on my iPhone there is half a second delay when pressing the stop & start buttons.
Is this a common issue and if so what is the fix?
BrandonMemberThere should not be any delay depending on how you are calling the stop watch.
Here is a sample (I cant post attachments in this section): http://www.genuitec.com/support-genuitec/viewtopic.php?f=8&t=6915
falloffalotMemberHi Brandon, thanks for the reply.
I have tidied things up & added lap / split times and the delay has gone, no idea what was causing that!
My only issue now is when I insert the <HTML> widget into the app and run it using the Mobi1 Web Sim the size gets all messed up.
As I have used MS Expression Web for many years I am creating my HTML script in that and copy / paste into Mobi1.
In Expressions my window size is set same as the iPhone screen, any idea what I’m doing wrong? I see your stopwatch uses a mix of JS and widgets / buttons.
Is this the best method instead all scripting.
How it looks in Expression
How it looks in Mobi0ne Web Sim
BrandonMemberYes, it uses javascript and widgets only for the interface. This will probably be your best bet in MobiOne as sometimes the HTML from other sites doesnt render correctly. I try to stay away from using html widget as a display for anything that MobiOne has a widget for.
falloffalotMemberOk thanks.
Is there a way of converting or extracting just the JS I need from the HTML?
BrandonMemberYes, you should be able to get it out. If its in HTML format the javascript will be in between <script> and </script> tags.
You will then have to change any code that uses the HTML iptut text boxes to MobiOne text boxes.
falloffalotMemberAh thanks, have just been looking at that way.
Thanks for the speedy response once again, it’s good to know that there is help out there when needed.
BrandonMemberNo problem.
-
AuthorPosts