Eep, HELP!
I am taking a javascript class and the instructor isn't very good at giving directions or showing us exactly what to do. He has us pretty much work from our book. Well, I have an assignment do and for the past hour I have been racking my brain trying to figure out what I am doing wrong. I followed the assignment as per the book and it's still not working (maybe a book error?)
The idea is to input the dollar amount in one field, the rate in the next and use the button to calculate into the third.
Any advice will be greatly appreciated!
The idea is to input the dollar amount in one field, the rate in the next and use the button to calculate into the third.
<html>
<head>
<title>
Exchange Rates
</title>
<script type="text/javascript">
<!--hide me from older browsers
function multiplyTheFieilds()
{
var number_one = window.document.the_form.the_dollar.valu e;
var number_two = window.document.the_form.the_rate.value;
var product = number_one * number_two;
window.document.the_form.the_answer.valu e = product;
}
// show me-->
</script>
</head>
<body>
<center>
<h1>Welcome to the Travel Assistant!</h1><p>
<h4>For All of Your Traveling Needs.</hr><p>
<br />
<hr>
<br />
Exchange rates:<br />
<table>
<tr>
<td>EUR
</td>
<td>GBP
</td>
<td>CAD
</td>
<td>JPY
</td>
<td>AUD
</td>
</tr>
<tr>
<td>0.7886
</td>
<td>0.6991
</td>
<td>1.2697
</td>
<td>97.81
</td>
<td>1.5603
</td>
</tr>
</table>
<br />
<form name="the_form">
<input type="text" name="the_dollar" value="Input Dollar Amount"> x <input type="text"
name="the_rate" value="input desired exchange rate"> = <input type="text"
name="the_answer"><br />
<input type="button" value="Calculate!" onClick="multiplyTheFields();">
</form>
<br />
<form><input type="button" value="Close Window" onClick="window.close();"></form>
</center>
</body>
</html>Any advice will be greatly appreciated!
