
February 8th, 2001, 07:38 PM
|
|
Contributing User
|
|
Join Date: Dec 2002
Posts: 14,578
  
Time spent in forums: < 1 sec
Reputation Power: 22
|
|
|
<i><b>Originally posted by : Jim Rudnick (jrudnick@kkti.com)</b></i><br />Hey Steve...<br />Yup, did just such a little puppy for our securites folks up here in Ontario, Canada.<br /><br />I've dropped the code below...cut and paste and run! <br /><br />Lemmeee know if you've any trouble...<br /><br />Jim<br />KKT INTERACTIVE<br />www.kkti.com<br />jrudnick@kkti.com<br /><br />88888888888888888888888888888888888888<br />'code below...<br />88888888888888888888888888888888888888<br /><br /><%@ Language=VBScript %><br /><br /><% Response.Buffer = TRUE %><br /><!-- above makes CASE & redirects work --><br /><!-- also wont let things hold in cache --><br /><br /><br /><!-- OSC FEE SITE --><br /><!------------------------------------------------------------------------------><br /><!-- changes Copyright © KKT INTERACTIVE 8.17.00 --> <br /><!------------------------------------------------------------------------------><br /><!-- test to see if formulas work... --><br /><br /><%<br /><br />DIM nDate<br />DIM nTime<br /><br />nDate=date()<br />nTime=time()<br />'set var to the date and time functions built into asp<br /><br />%><br /><br /><html><head></head><br /><body background="pbBACK.jpg"><br /><br /><CENTER><br /><H2><br />WELCOME TO THE OSC FEE CALCULATOR<br /></H2><br /></CENTER><br /><BR><BR><br /><br /><ul><ul><ul><ul><br /><br />The current date is <%=nDate%>. The current time is now <%=nTime%><br /><BR><br /><HR><br /><B><u>USER ENTRY FORM</u></B><br /><br /><form action="calculator.asp" method=post><br /><br /><br /><table border="0" cellpadding="0" cellspacing="0"><br /><br /><tr><br /> <td width=265>Number of Directors:</td><br /> <td><input type="text" name="directors" size="10" value=""></td><br /> <TD width=50> </TD><br /> <td><font size=2>Each individual Director costs $500</font></td><br /> </tr><br /><br /> <tr><br /> <td>Number of Employees To Be Hired:</td><br /> <td><input type="text" name="employees" size="10" value=""></td><br /> <TD width=50></TD><br /> <td><font size=2>Each individual employee will cost $400</font></td><br /> </tr><br /><br /> <tr><br /> <td>Activities to be Undertaken:</td><br /> <td><input type="text" name="activities" size="10" value=""></td><br /> <TD width=50></TD><br /> <td><font size=2>Each Activity costs $333</font></td><br /> </tr><br /><br /></table><br /><p><br /><br /><input type="submit" name="btnView" value="CALCULATE"><br /></form><br /><hr><br /></ul></ul></ul></ul><br /><!------------------------- FORMULA SECTION ---------------------------------------------------------><br /><br /><ul><ul><ul><ul><br /><B><u>CALCULATED FEES</u></B><br /><P><br /><%<br /><br />DIM noEmployees<br />DIM jvr<br />DIM directors<br />DIM grandTotal<br /><br />noEmployees = 2<br />jvr = 5<br />directors = Request.Form("directors")<br />employees = Request.Form("employees")<br />activities = Request.Form("activities")<br /><br />' if (jvr * noEmployees) > 5 then<br />' conditional here...maybe use client-side validation to verify entries were made?<br />' now show html calculations for user to see their fees...<br /><br /> directorFees = (500 * directors)<br /> employeeFees = (400 * employees)<br /> activityFees = (333 * activities)<br /><br /> grandTotal = (directorFees + employeeFees + activityFees)<br /> <br /> %><br /><br /> Your fees for <%=directors%> Directors will be $<%=directorFees%><br /> <p><br /> Your fees for <%=employees%> Employees will be $<%=employeeFees%><br /> <p><br /> Your fees for <%=activities%> Activities will be $<%=activityFees%><br /> <br><br><br /> <br /> <ul><br /> And your Grand Total is <b>$<%=grandTotal%></b><br /> </ul><br /> <br /> <%<br />' end if<br />' above will let me use math...and test for same...<br />' now to try and capture the values entered by the user....<br /><br />%><br /><br /></ul></ul></ul></ul><br /></body><br /></html><br /><br />
|