I'm trying to create and then post, a simple, working investment calculator to the web. I use Microsoft Visual Studio. As a novice, I am having a little problem with executing this code.
Please help. I need an answer by Noon October 1 (EST).
Thanks so much for your expertise! Here's the code so far. Please help with syntax:
__________________________________________________ _______________
<html>
<head>
<title>Investment Calculator</title>
</head>
<body>
<%
DIM initialinvestment, annualrateofreturn, numberofyears
initialinvestment = request.form ("initialinvestment")
response.write ("Initial investment is:" & initialinvestment & "<br/>")
annualrateofreturn = request.form ("annualrateofreturn")
response.write ("Annual rate of return is:" & annualrateofreturn & "<br/>")
numberofyears = request.form ("numberofyears")
response.write ("Number of years:" & numberofyears & "<br/>")
for counter = 1 to n
initialinvestment = initialinvestment
annualrateofreturn = annualrateofreturn
numberofyears = counter
next
%>
<form method = "post" action= "Investment Calculator.asp">
<h4>Initial Investment:</h4>
<input type= "text" name= "initial investment" value=<%= initialinvestment%>/><br/>
<h4>Expected Annual Rate of Return(%):</h4>
<input type="text" name="annual rate of return" size = "10" maxlength = "10" value=<%= annualrateofreturn%>'/><br/>
<h4>Number of Years:</h4>
<input type="text" name="number of years" size = "3" maxlength = "3" value=<% = numberofyears%>/><br/>
<p><input type="submit" name ="Calculate the Future Value" value="submit"/></p>
<input type= "reset" name="Reset" value = "Reset">
</form>
</body>
</html>
__________________________________________________ _______________
Notes:
1) The interest is compounded annually.
2) The form should stay filled in so that the user can make changes to the previous input and resubmit.
3) I need a running results table (two columns) underneath the form. This table will display the year in (col1) and the value of the investment at the end of the year (col2).
Please post answer to this forum or to my email
activexcode@hotmail.com.
Once again, thanks! :-)