jStorage
jStorage copied to clipboard
Cannot call method 'set' of undefined
Hi,
I have this code:
function selectChecked() {
var selected = new Array();
var chk_arr = document.getElementsByName("checkbox[]");
var chklength = chk_arr.length;
for(k=0;k< chklength;k++)
{
if (chk_arr[k].checked == true)
selected.push(chk_arr[k].value);
}
$.jStorage.set("links", selected);
}
And have this error: Cannot call method 'set' of undefined
I even try change selected to "teststring" and I have the same error
Are you sure you have jStorage loaded on your page since $.jStorage can be undefined only if it not loaded on the page. Additionally I'd suggest you to upgrade Prototype version.
this is happening on sites that use require.js