I’m Really confused.

Javascript array not working

I have a app that uses a Javascript array to save checked items into local storage and display only those checked items onto the 2nd page.

Page 1:
var mobilecheckboxgroup = Apperyio("Checkbox_A").find(":checked");
var arr = [];
mobilecheckboxgroup.each(function(){
arr.push($(arr).val());
});
localStorage.setItem("arr", arr);





Page 2:
var s = localStorage.getItem("arr");
Apperyio("Device2_label").text(s.replace(/,/gi,",\n"));





Problem is nothing is being saved into localstorage and being sent to the 2nd page.
(2nd page is actually blank im using an old screen shot)
1 person has
this question
+1
This topic is no longer open for comments or replies.