1. #1
    Sencha User deepakgarg89's Avatar
    Join Date
    Nov 2012
    Location
    Gurgaon, India
    Posts
    43
    Vote Rating
    0
    deepakgarg89 is on a distinguished road

      0  

    Default Set a variable in session

    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
    269
    Vote Rating
    31
    themightychris has a spectacular aura about themightychris has a spectacular aura about

      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
    deepakgarg89 is on a distinguished road

      0  

    Default Hi themightychris,

    Hi themightychris,


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

Thread Participants: 1

Tags for this Thread