javascript - PhoneGap (web mobile app) - Transfer data between pages -


i'm developing phonegap application. if don't know is, it's service allows build mobile-based applications using html, css , javascript.

i have application, , i've come point need transfer information 1 page another. user chooses option on page, application loads new page , based on option loads specific content.

now know few ways of doing this, name one.. local storage maybe. question is, efficient way of getting information between these 2 pages? if php i'd using $_get[''].. it's not php, i'm looking best way using html, css, , javascript.

any here highly appreciated!

there several possibilities:

  1. you using service phonegap:build or cordova: gonna have 1 html-file continously hide , show different pages. don't recommend one, phonegap:build , cordova great create package major phones, without headache.

  2. url-parameters pass parameter on url different html-page. means have open links window.location.replace() or change href-attribute on anchors. in next page have parse url, not easy in php.

  3. localstorage / sessionstorage can store data in sessionstorage. sessionstorage.myobject = json.stringify(complexobject) can store complex objects session storage , read them var complexobject = json.parse(sessionstorage.myobject). available during complete session , 1 of easiest solutions far.


Comments

Popular posts from this blog

matlab - Deleting rows with specific rules -

jquery - How would i go about shortening this code? And to cancel the previous click on click of new section? -