i want to show total price after adding quantity to next page after clicking confirm order button
username.html
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>Untitled Document</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<meta name="viewport" content="width=device-width,initial-scale=1"/>
<link rel="stylesheet" href="css/jquery.mobile-1.2.0.min.css" />
<script src="js/jquery-1.8.3.min.js"></script>
<script src="js/jquery.mobile-1.2.0.min.js"></script>
<script src="js/login.js"></script>
</head>
<body>
<div data-role="page" id="detailsPage" data-theme="a">
<div id="head1" data-role="header" >
<ul id="result"></ul>
</div>
<div data-role="content" id="myContent">
<ul id="Order">
</ul>
<input type="button" value="-" class="minus">
<input name="quantity" id="quantity" type="number" value="1" class="input-text">
<input type="button" value="+" class="plus">
<br />total price:
<span class="newprice" id="nwprice" ></span>
<a href="confirm.html" data-role="button" class="ui-enabled">Confirm Order</a>
</div>
<div id="footer" data-theme="a" data-role="footer">
<h3>
Footer
</h3>
</div>
</div>
<script>
$(document).ready(function(){
var value = window.localStorage.getItem("path");
var val1=window.localStorage.getItem("model");
var val2=window.localStorage.getItem("price");
var val3=window.localStorage.getItem("description");
var val4=window.localStorage.getItem("image");
$("#result").append('<li><h3>'+value+'</h3></li>');
$("#Order").append('<li><img src= "'+val4+'"HEIGHT="120" WIDTH="100" BORDER="0"></img><h3>Product Model:'+val1+'</h3><br><h3>Product Price:'+val2+'</h3><br><h3>Product Description:'+val3+'</h3></li>');
});
function calculate(){
var val2=window.localStorage.getItem("price");
var quantity = parseInt($(":input[name='quantity']").val());
var total = val2 * quantity;
$(".newprice").text(total);
alert(total);
}
function changeQuantity(num){
$(":input[name='quantity']").val( parseInt($(":input[name='quantity']").val())+num);
}
$().ready(function(){
calculate();
$(".minus").click(function(){
changeQuantity(-1);
calculate();
});
$(".plus").click(function(){
changeQuantity(1);
calculate();
});
$(":input[name='quantity']").keyup(function(e){
if (e.keyCode == 38) changeQuantity(1);
if (e.keyCode == 40) changeQuantity(-1);
calculate();
});
var quantity = document.getElementById("quantity");
quantity.addEventListener("input", function(e) {
calculate();
});
});
var quantity1=.total; //here what i write jus suggest me....
window.localStorage.setItem("quan",quantity1);
var val7= window.localStorage.getItem("quan");
alert(val7);
</script>
</body>
</html>
i'm using local storage to send previous data to next page