I am trying to make a form that allows for the user to enter a value and then have a calculation performed on that value and the result then displayed in a alert box. I cannot seem to figure out what the problem is. Any help would be appreciated.
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" 
    "http://www.w3.org/TR/html4/loose.dtd">
<html lang="en">
<html>
<head>
<title>CalcShipping</title>
<script type="text/javascript">
function AddShipping(){
    var PurchasePrice = documentGetById('TextInput'.value;
    var Shipping;                       
    if (PurchasePrice <= 25){
        Shipping = 1.5;
    }
    else{
        Shipping = PurchasePrice * 10 / 100;
    }
    var FinalPrice = PurchasePrice + Shipping;
    alert ('FinalPrice');
</script>
</head>
<body>
<p id="FinalPriceParra"></p>
<form>   Enter Purchase Price <input type="text" id="TextInput" value=""/><br/> 
    <input type="button" value="Submit" onclick="AddShipping()";/></form>
</body>
</html>
 
     
     
    