Calculations in FrontPage 2003
Calculations in FrontPage 2003
(OP)
I have a form that I would like to calculate from fields. This is got to be a simple procedure but I tried using help to search for calucations and formulas and got no assistance.
Here's an example I would like
Field-1 is a drop down box with numbers
Field-2 is a drop down box with percentage number
Field-3 is the result of Field-1 + the percentage number
So if I pick 10 in Field-1 and 20% on Field-2 them Field-3 should show the result of the calculation as 12.
Here's an example I would like
Field-1 is a drop down box with numbers
Field-2 is a drop down box with percentage number
Field-3 is the result of Field-1 + the percentage number
So if I pick 10 in Field-1 and 20% on Field-2 them Field-3 should show the result of the calculation as 12.
RE: Calculations in FrontPage 2003
RE: Calculations in FrontPage 2003
RE: Calculations in FrontPage 2003
<html>
<head><title>Bonus Calculator</title>
<meta name="description" content="Bonus calculator.">
<meta name="keyword" content="Bonus calculator">
<SCRIPT LANGUAGE="JavaScript">
//<!- hiding the code
function calculate(form){
var hourly;
var bonus;
var bonus1;
var bonus2;
var bonus3;
hourly=form.hourly.value;
bonus=form.bonus.value;
bonus1=2080*form.hourly.value*form.bonus.value/100;
bonus2=2080*form.hourly.value*0.2;
bonus3=2080*form.hourly.value*0.35;
}
// end hiding ->
</SCRIPT>
</head>
<body bgcolor=ffffff>
<center>
<p>
<font size=+2 face="arial,Helvetica" color=ff0000>Calculate Your Bonus</font><br><br>
<table width=632><tr><td>
Enter hourly rate
</td></tr></table><p>
<form name=form1>
<table border=4 width=751 height="116">
<tr><td>
<table border=0>
<tr><td align=right>Hourly Rate ($):</td><td align=left>
<input name=hourly value=10
size=8></td></tr>
<tr><td colspan=2 align=center>
<p align="right">Bonus
(%) <input name=bonus value=40 size=8></table>
<p><input type=button name="calc" value="Calculate Yearly Bonus" onClick="calculate(this.form)"></td>
<td>
<center><font size=+1 color=red>Results:</font></center>
<table border=0>
<tr><td align=right>Bonus for the Year with this Week Bonus as an average:</td><td align=left>
<input name=bonus1 value='' size=8></td></tr>
<tr><td align=right>Bonus for the Year with an average of 20%
:</td><td align=left><input name=bonus2 value='' size=8></td></tr>
<tr><td align=right>Bonus for the Year with an average of 35%
:</td><td align=left><input name=bonus3 value='' size=8></td></tr>
</table>
</td></tr></table>
</center>
</body>
</html>