Good afternoon person. I need to save a data in LocalStorage and then check if this value exists on another page, I tried it here but it did not work.
First I define the value of the "variable" Prof_AMC
if($(myEmail == singleMail)){
if(approved == true && categoria == 'PLF'){
// Cria um item "Prof_AMC" com o e-mail do usuário
window.localStorage.setItem('Prof_AMC', singleMail);
window.location.href = document.referrer+'?sc=2'; // Parametro URL Politica PLF
}
Then on another page I try to check if it exists and if the SC parameter is different from -1:
if(window.location.href.indexOf("sc")!=-1 && localStorage.getItem('Prof_AMC')){
}