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
    251
    Vote Rating
    26
    themightychris will become famous soon enough themightychris will become famous soon enough

      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
    Co-founder @ Devnuts - Philadelphia Hackerspace

  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