Results 1 to 3 of 3

Thread: Set a variable in session

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Sencha User deepakgarg89's Avatar
    Join Date
    Nov 2012
    Location
    Gurgaon, India
    Posts
    43
    Vote Rating
    0
      0  

    Default Set a variable in session

    Hi,

    Suppose i have a variable xyz = 5, i want to set it in session in sencha touch 2. Can anyone please tell me how can i set it in session, please provide me a get method also.

    Thanks

  2. #2
    Sencha Premium Member
    Join Date
    Apr 2008
    Posts
    357
    Vote Rating
    86
      0  

    Default

    You don't need Sencha's help, LocalStorage is available on all the browsers Sencha Touch supports.

    Just do:
    Code:
    localStorage.setItem('xyz', 5);
    alert(localStorage.getItem('xyz'));
    Chief Architect @ Jarv.us Innovations
    Co-captain @ Code for Philly

    Jarvus builds and optimizes top-quality Sencha Touch and ExtJS apps for open-source projects and clients of all sizes.

    Don't waste time with bugs that have already been found and fixed by the community, compile our tried and tested hotfixes packages into all your projects: https://github.com/JarvusInnovations/sencha-hotfixes

  3. #3
    Sencha User deepakgarg89's Avatar
    Join Date
    Nov 2012
    Location
    Gurgaon, India
    Posts
    43
    Vote Rating
    0
      0  

    Default Hi themightychris,

    Thanks for the reply... I was just confused in setting a parameter.

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •