here is a script I am writing and having problems with. It keeps coming up with an object error. What have I done wrong. Thanks in advanced.
<?xml version="1.0" encoding="UTF-8" standalone="no" ?>
<!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>ball calculator</title>
<script type="text/Javascript">
function calcball(ball, qty){
var price = 0.00;
msg = "";
if (ball == "The Cell") price = 150.00;
else if (ball == "Cell Pearl") price = 200.00;
else if (ball == "Cell Rouge") price = 220.00;
else if (ball == "Agent") price = 160.00;
price *= qty;
msg += "Total price is: $" + price;
alert(msg);|
}
</script>
</head>
<body>
<h1> Ball Order Form</h1>
<form name="ballorder">
<tableborder="0" cellpadding="4" cellspacing="3">
<tr>
<td><label>Select Ball:</label></td>
<td><select name="ball" size="1">
<option value="The Cell">The Cell</option>
<option value="Cell Pearl">Cell Pearl</option>
<option value="Cell Rogue">Cell Rogue</option>
<option value="Agent">Agent</option>
</select></td>
</tr>
<tr>
<td><label>Quanity:</label></td>
<td><input name="qty" type="text" value="1" size="3" maxlength="3" /></td>
</tr>
</table>
<p><input name="btnCalculate" type="button" value="Calculate" onclick="calcball(ball.value, qty.value)" /></p>|
</form>
</body>
</html>