Results 1 to 6 of 6
  1. Jayrot's Avatar
    Posts
    86 Posts
    Global Posts
    88 Global Posts
       #1  
    I'm working on my very first app, with no previous experience in programming.


    For background, my app is going to allow the user to track dates. The user will enter an important date, and then the app will calculate and display how many days have passed since that date. Pretty simple.

    I think I've got a handle on the javascript of how to do that calculation. My (stupid) question is how to I get the date that the user entered (presumably as a var) to save such that when the app is closed and re-opened the data has been saved and continues to be tracked.

    Thanks. Be kind!
  2. Tibfib's Avatar
    Posts
    345 Posts
    Global Posts
    347 Global Posts
    #2  
    Quote Originally Posted by Jayrot View Post
    I'm working on my very first app, with no previous experience in programming.


    For background, my app is going to allow the user to track dates. The user will enter an important date, and then the app will calculate and display how many days have passed since that date. Pretty simple.

    I think I've got a handle on the javascript of how to do that calculation. My (stupid) question is how to I get the date that the user entered (presumably as a var) to save such that when the app is closed and re-opened the data has been saved and continues to be tracked.

    Thanks. Be kind!
    Tutorials webOS Using Cookies - WebOS Internals
    Mojo.Cookie - WebOS101

    Here you go!

    Ask if you have any questions and I'll try and answer them.
  3. sumitk's Avatar
    Posts
    48 Posts
    Global Posts
    55 Global Posts
    #3  
    Quote Originally Posted by Tibfib View Post
    Ask if you have any questions and I'll try and answer them.
    What's the meaning of life?
  4. #4  
    42
  5. #5  
    Quote Originally Posted by Jayrot View Post
    I'm working on my very first app, with no previous experience in programming.


    For background, my app is going to allow the user to track dates. The user will enter an important date, and then the app will calculate and display how many days have passed since that date. Pretty simple.

    I think I've got a handle on the javascript of how to do that calculation. My (stupid) question is how to I get the date that the user entered (presumably as a var) to save such that when the app is closed and re-opened the data has been saved and continues to be tracked.

    Thanks. Be kind!
    As Tibif said, you can save it as a cookie or you can save it as a depot data list if there are a bunch of dates to remember.

    Both methods are used in the samples in the SDK so you can see how it's done in there. Good luck.
    mobigamedepot.com
  6. Jayrot's Avatar
    Posts
    86 Posts
    Global Posts
    88 Global Posts
       #6  
    Thanks. I'm having a little trouble with this, but it's mostly a result of my inexperience with javascript.

Posting Permissions