Questions tagged as 'localstorage'

1
answer

Save checked checkboxes and load them when the page is reloaded

I would like checked checkboxes to be saved and loaded whenever the page is reloaded or reopened, in addition, icons will be displayed for the options. I made a function in java script that loads the functions when the page is opened, using t...
asked by 25.06.2018 / 03:38
1
answer

How to pass headers on request with Vue.js 2

I need to pass the header Authorization which is located in localStorage with the key of iflix-user-token , here is my code: getFilmes: function () { this.$http.get(Api.url + '/filme').then( response => {...
asked by 22.10.2017 / 15:17
1
answer

Login with angle 4

I'm learning angular4, and I'd like to know a way to login with it. I can get the data from the backend, but how do I configure the session? (I came from php, the era just use session). I saw something about storing a token in the localstorag...
asked by 18.08.2017 / 19:30
3
answers

Doubt with LocalStorage -

I have this code that is counting the amount of Clicks, but I wanted it when I close the Browser the counter does not clear. var p = document.createElement("p"); document.body.appendChild(p); $(document).ready(function(){...
asked by 08.11.2018 / 19:24
2
answers

Problem saving information in localstorage via js

html <div id="timer"> <span id="minutes"></span>:<span id="seconds"></span> </div> JS window.onload = function() { var access = localStorage.getItem('firstAccess'); if(a...
asked by 17.10.2017 / 18:34
1
answer

Convert Json to a Long type

I have a Json object coming from the localStorage and I need it to be converted to a Long type, in the case entidadeId idEntidade = localStorage.getItem("idEntidade"); var entidadeId = JSON.parse(idEntidade);     
asked by 13.10.2017 / 21:41
1
answer

Save to locationStorage position to maintain when reloading page

When the user clicks on a particular button, the scroll position of an element changes. I would like this action to be stored in LocalStorage, but I do not know how to do it ... can you help me? Here's my script: $('.btn.parteum').click(fun...
asked by 06.12.2018 / 06:07
3
answers

store an array of objects in a local storage with JS

I'm a bit lazy with JavaScript and I'm trying to create an array of objects to save data from a form with localStorage , but I'm not sure how to do that. I have already created the code to save the data in the local store, but only sa...
asked by 13.09.2018 / 05:13
1
answer

Confusions with JSON.stringify, JSON.parse, and OBJECT.push ()

Well I'm messing with these commands, in reality what I'm wanting to do is the following. Using localStorage maintain a database. NOME TABELA | DADOS TABELA tbl_TESTE | {teste 01, teste02, teste03, ...} tbl_TESTE02 | {arroz, feijão, b...
asked by 05.05.2016 / 19:57
1
answer

Search on siteStorage

Well I need to do a search on the localStorage, and in this I need to know which item to get with a particular character, for example: Quero pegar todos as key que começão com pes_ ou seja no exemplo abaixo eu pegaria. ---- KEY ----------|----...
asked by 10.05.2016 / 21:54