Hello
I have an ethernet relay board (RobotShop dS1242).
The setup for secure remote access is to write a cookie to my PC, which can then be executed to load the password into the browser everytime I want to
access the board.
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
<!DOCTYPE HTML>
<html>
<head>
<title>Password Setup</title>
<meta name="viewport" content="width=device-width, initial-scale=1.0">
</head>
<body>
Local Storage Available:
<div id='avail'>?</div><br>
Old password was:
<div id='old'>?</div><br>
Password to store is:
<div id='password'>xxxxxxxxx</div><br>
Stored password is:
<div id='storedpassword'>?</div> <br>
<script>
if(typeof(Storage) !== "undefined") {
document.getElementById('avail').innerHTML = "Yes";
} else {
document.getElementById('avail').innerHTML = "No";
}
document.getElementById('old').innerHTML = localStorage.pword;
var pw = document.getElementById('password').innerHTML;
localStorage.pword = pw;
document.getElementById('storedpassword').innerHTML = localStorage.pword;
</script>
</body>
</html>
----------------------------------------
RESULTS:
Local storage avail:
Yes
Old password was:
?
Password to store is:
xxxxxxxxx
Stored password is:
?
---------------------------------------------
All I really need is a simple HTML/Java file with the password hard-coded.
Can some one help?
Thanks
Marty
Montreal, Canada
I have an ethernet relay board (RobotShop dS1242).
The setup for secure remote access is to write a cookie to my PC, which can then be executed to load the password into the browser everytime I want to
access the board.
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
<!DOCTYPE HTML>
<html>
<head>
<title>Password Setup</title>
<meta name="viewport" content="width=device-width, initial-scale=1.0">
</head>
<body>
Local Storage Available:
<div id='avail'>?</div><br>
Old password was:
<div id='old'>?</div><br>
Password to store is:
<div id='password'>xxxxxxxxx</div><br>
Stored password is:
<div id='storedpassword'>?</div> <br>
<script>
if(typeof(Storage) !== "undefined") {
document.getElementById('avail').innerHTML = "Yes";
} else {
document.getElementById('avail').innerHTML = "No";
}
document.getElementById('old').innerHTML = localStorage.pword;
var pw = document.getElementById('password').innerHTML;
localStorage.pword = pw;
document.getElementById('storedpassword').innerHTML = localStorage.pword;
</script>
</body>
</html>
----------------------------------------
RESULTS:
Local storage avail:
Yes
Old password was:
?
Password to store is:
xxxxxxxxx
Stored password is:
?
---------------------------------------------
All I really need is a simple HTML/Java file with the password hard-coded.
Can some one help?
Thanks
Marty
Montreal, Canada