Menu
Cart 0

z test

  • $ 0.00


<body bgcolor="#FFFFFF" link="#3333CC" vlink="#6633CC" alink="#6633CC" onload="" id="element1" onunload="" scroll="auto"> <noscript> <img height="40" width="373" border="0" alt="" src="http://www.homestead.com/~media/elements/shared/javascript_disabled.gif"> </noscript> <div class="lpxcenterpageouter"> <div class="lpxcenterpageinner"><!-- <hs:element2> --> <div id="element2" style="position: absolute; top: 125px; left: 162px; width: 469px; height: 144px; z-index: 0;"><script src="" data-mce-src="http://ajax.aspnetcdn.com/ajax/jQuery/jquery-1.11.2.min.js"></script><script> function perimeterSize(height, width) { var out = (+height + +width) * 2; return out; } function squareFeetSize(height, width) { var out = (+height * +width) / 144; return out; } function perimeterCost(framePeriRate, periSize) { var out = +framePeriRate* (+periSize / 12) return out; } function sqFtCost(panelSqFtRate, squFtSize) { var out = +panelSqFtRate * +squFtSize; return out; } function totalCost(periCost, sqFtCost, flatRate) { var out = +periCost + +sqFtCost + +flatRate; return out; } function price(totalCost, margin) { var out = +totalCost / +margin; return out; } function calculatePrice() { var framePeriRate = 3; var margin = 0.4; var flatRate = 10; var panelSqFtRate = 6; var height = $('#height').val(); var width = $('#width').val(); var quantity = $('#quantity').val(); if (height == '') { alert("Enter Height"); return false; } if(width == '') { alert("Enter width"); return false; } if(!$.isNumeric(height) || !$.isNumeric(width)|| !$.isNumeric(quantity)){ return false; } if(quantity == '') { quantity = 1; } var periSize = perimeterSize(height, width); var squFtSize = squareFeetSize(height, width); var periCost = perimeterCost(framePeriRate, periSize ); var sqFtCosts = sqFtCost(panelSqFtRate, squFtSize); var totalCosts = totalCost(periCost, sqFtCosts, flatRate); var prices = price(totalCosts, margin); var finalPrice = +quantity * +prices; $('#priceLabel').text(finalPrice.toFixed(2)); } </script> <h3>Price: <label id="priceLabel" style="color: red;">0.00</label></h3> <fieldset style="width: 25%"><legend>Check Price</legend> <table> <tr> <td>Height(inches):</td> <td><input type="text" id="height" /></td> </tr> <tr> <td>Width(inches):</td> <td><input type="text" id="width" /></td> </tr> <td>Quantity</td> <td><input type="text" id="quantity" value="1" /></td> <tr> <td colspan="2"><input type="submit" value="Calculate Price" onclick="calculatePrice()" /></td> </tr> </table> </fieldset> </div> </div> </div> </body>

Recently Viewed Items