The setup for secure access to my Robo relay board (dS1242) is to write a cookie to my PC, which can then be executed to load the password into the browser every time I want to access the board remotely. But the cookie does not execute correctly, ie it doesn’t load the password. Can some one look at the code and tell me what is going on?
Thanks
[code]
Password Setup
Local Storage Available:
?
Old password was:
?
Password to store is:
xxxxxxxxxx
Stored password is:
?
RESULTS:
Local storage avail:
Yes
Old password was:
?
Password to store is:
xxxxxxxxx
Stored password is:
?[/code]
Regarding the nuances of accessing / programming RB-Dev-82, can’t provide much insight into specific code. Perhaps the manufacturer might be in a position to help? [email protected]
I do not think .pword is a valid method of the localStorage object in JavaScript. Check out this reference. I think what you need is localStorage.getItem(COOKIE_NAME), where cookie name is whatever the stored cookie is called – which I don’t see anywhere. My best guess is: localStorage.getItem(‘pword’); Honestly, I am not seeing what the script accomplishes, except checking if local storage exists, and then possibly showing the value of the cookie. Also, a cookie is just a text file that stores a small piece of data, it doesn’t execute, the script does.