Hi,
I am a beginner to coding javascript. I have spent many hours trying to get this calculation result to display in the form box in the browser window. I think the calculation is correct because it works when I use a calculator but it doesn't do anything as it is now coded. Do I use parseInt, or Math.round and do I display it by saying return payment;

Any help would be greatly appreciated! Here's the code by cut and paste method:

<html>
<head>
<title>Final exam 2</TITLE>
<script>
/* car payment calculation function coding here */
<!--
function calc(myform) {
var interest = myform.rate.value / 100;
var total = ((myform.price.value - myform.down.value) * (1 + myform.rate.value));
var payment = myform.total.value / 60;{
return payment;
}

</script>
</head>
<body bgcolor="#FFE4E1">
<h1>Final Exam Car Payment Calculator(CPC)</h1>
<p>
</p><form name="myform" id="myform"><!--are the name and id required? I've seen examples of forms that are referenced in the script. The function is calling "myform" right?-->
<table border="1">
<tr>
<td>Car Price:</td>
<td><input type="text" value="0" name="price" /></td>

</tr>
<tr>
<td>Interest rate:</td>
<td><input type="text" value="5.5" name="rate" /></td>
</tr>
<tr>
<td>Number of Years:</td>
<td>5 years (60 months)
</td>
</tr>
<tr>
<td>Down Payment:</td>
<td><input type="text" value="0" name="down" /></td>
</tr>

<tr>
<td>Monthly Payment:</td>
<td><input type="text" name="payment" onFocus="this.blur();" /></td><!--Why is this blur?-->
</tr>
</table>
<p></p>
<p>
<input type="button" value="Calculate" onClick="return calc(this)" />
<input type="reset" value="Reset" />
</p></form>

<hr />
<h3>Question #2</h3>
Write a JavaScript function - calc() with parameter/argument to calculate a car payment:
<ul><li>interest = rate / 100</li>

<li>total = ((price - down) * (1 + interest))</li>
<li>payment = total / 60 </li>
</ul>

</body>
</html>

Thanks, in advance!!