Not getting anything on page2 after i select option from index.html etc how can i fix it?
[code]
index.html code
<!DOCTYPE html>
<html>
<head>
<title> Page 2 – Codemaker</title>
<script>
function passval()
{
var selecttext=document.getElementById(“mytext”).value;
localStorage.setItem(“ddvalue”,selecttext);
return true;
}
</script>
</head>
<body>
<h1>Photos</h1>
<form action=”./html/page2.html”>
<select id=”mytext”>
<option selected disabled>Photos</option>
<option>8×10 $25</option>
<option>5×7 $10</option>
<option selected disabled>Giftcards</option>
<option>6×4 $4</option>
<option>5×7 $5</option>
</select>
<input type=”submit” value=”submit” onclick=”passval()”>
</form>
</body>
</html>
[code]
page2,html
<!DOCTYPE html>
<html>
<head>
<title>Page 2</title>
</head>
<body>
you selected:<span id=”results”></span>
<script>
document.getElementById(“results”).innerHTML=localStorage.getItem(“ddvalue”);
</script>
</body>
</html>