Click here to Skip to main content
15,887,350 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
SQL
HI , i developing  a android app using backbon.js  and need to   kept user details in sessions  or local storage ,  i am using the following code to  save the data in localstorage
window.localStorage.setItem("ICName", data.ICName);
                       window.localStorage.setItem("ICID", data.ICID);
                       window.localStorage.setItem("IAID", data.IAID);
                       window.localStorage.setItem("ialastname", data.ialastname);
                       window.localStorage.setItem("iafirstname", data.iafirstname);
                       window.localStorage.setItem("IAPhone", data.IAPhone);
                       window.localStorage.setItem("IAEmail", data.IAEmail);
                       window.localStorage.fax("fax", data.fax);
and  i am trying to retrive them in other page   like this

 $('#txtAdusterName').val( window.localStorage.getItem("iafirstname") + window.localStorage.getItem("ialastname"));
           alert('Session  ' + window.localStorage.getItem("iafirstname") + window.localStorage.getItem("ialastname"));
           $('#txtadjusterphone').val(window.localStorage.getItem("IAPhone"));
           alert('Session  '+window.localStorage.getItem("IAPhone"));
           alert('Session  ' + window.localStorage.getItem("IAEmail"));
           alert('Session  ' + window.localStorage.getItem("ICName"));
           $('#txtAdjusterEmail').val(window.localStorage.getItem("IAEmail"));
           $('#txtCompany').val(window.localStorage.getItem("ICName"));

and the problem i am facing is the app when  run on  any browser  it was  working file and i  able to get the data from  local storage  but   when it  installed in  phone   it was  not getting the data, i also used SessionStorage("KEY","Value") , can any one help tto get out of this ,   Thanks in advance......
Posted

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900