×
INTELLIGENT WORK FORUMS
FOR COMPUTER PROFESSIONALS

Contact US

Log In

Come Join Us!

Are you a
Computer / IT professional?
Join Tek-Tips Forums!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!

*Tek-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

Students Click Here

Calculations in FrontPage 2003

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.

RE: Calculations in FrontPage 2003

Will you be working in Javascript or VBScript

RE: Calculations in FrontPage 2003

(OP)
well... I don't know neither one but it if helps, a co-worker knows VBScript very well.

RE: Calculations in FrontPage 2003

(OP)
I put something together uaing javascrip but looks like I am missing something.  Below is the entire HTML code for that page.  thanks for your help.


<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&nbsp;&nbsp; ($):</td><td align=left>
    <input name=hourly value=10
 size=8></td></tr>
<tr><td colspan=2 align=center>
    <p align="right">Bonus&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
    (%) <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&nbsp; 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%&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
    :</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%&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
    :</td><td align=left><input name=bonus3 value='' size=8></td></tr>
</table>
</td></tr></table>

</center>
</body>
</html>

Red Flag This Post

Please let us know here why this post is inappropriate. Reasons such as off-topic, duplicates, flames, illegal, vulgar, or students posting their homework.

Red Flag Submitted

Thank you for helping keep Tek-Tips Forums free from inappropriate posts.
The Tek-Tips staff will check this out and take appropriate action.

Reply To This Thread

Posting in the Tek-Tips forums is a member-only feature.

Click Here to join Tek-Tips and talk with other members! Already a Member? Login

Close Box

Join Tek-Tips® Today!

Join your peers on the Internet's largest technical computer professional community.
It's easy to join and it's free.

Here's Why Members Love Tek-Tips Forums:

Register now while it's still free!

Already a member? Close this window and log in.

Join Us             Close