hye..im new here..now, im doing my final year project..this is my page code:
HTML Code:
<!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>
<meta content="en-us" http-equiv="Content-Language" />
<meta content="text/html; charset=utf-8" http-equiv="Content-Type" />
<title>testing calculation</title>
<style type="text/css">
.style2 {
text-align: left;
}
.style3 {
font-family: "Bauhaus 93";
font-size: xx-large;
background-color: #C0C0C0;
}
</style>
</head>
<body style="background-color: #C0C0C0">
<div class="style2">
CAR CC:
<input name="carcc" type="text" /><br />
SPEED
: <input name="speed" type="text" /><br />
TRAVEL OCCURRENCES : <input name="occurrence" type="text" /><br />
PASSENGERS: <input name="passenger" type="text" /><br />
DISTANCE: <input name="distance" type="text" />
</div>
<form method="post">
<div class="style2">
<input name="submit" type="submit" value="CALCULATE RESULT" class="style3" /></div>
</form>
</body>
</html>
..my problem now is i want to make a calculation for all the values in the text boxes and show the result under the CALCULATE RESULT button..my formula for this calculation is like this:
[-20.955 + (0.0013 * carcc) + (0.1463 * speed) + (0.6766 * occurrence) + (0.04 * passenger) + (0.1481 * distance)]
thanks for your help =)  
Last edited by chrishirst; 01-16-2011 at 10:55 AM..
|