trying to create calculator

wxdqz

New Member
Hello,
This is my first inquiry to this forum and I'm hoping someone can help me. I know little to nothing about JS but learn everything web-wise by looking at and borrowing what others have done before me (which I appreciate greatly).

Currently I am charged with creating a calculator function where the user inputs one number to produce three calculations based on different numbers. I've copied what I have so far in hopes that someone can help determine my problem. The first calculation works, but the next two do not.

<FORM name="formx">
<p align="left">My investment is $
<input type=text size=10 value=http://www.webdeveloper.com/forum/archive/index.php/100 name="a">

</p>
<p align="left">When the calculation is done, </p>
<p align="left">I will receive: $
<input type "number" value=0 name="ans" size=10>
in #1 bonds,
<input type="hidden" value=".37037037" name="b">
<input type="button" value=" Calculate " onClick="a_times_b(this.form)" name="button">
</p>
<p align="left">and: $
<input type "number" value=0 name="ans2" size=10>
in #2 bonds,
<input type="hidden" value=".62932963" name="c">
<input type="button" value=" Calculate " onClick="a_times_c(this.form)">
</p>
<p align="left">and: <input type "number" value=0 name="ans2" size=10> in extras.
<input type="hidden" value=".02310198" name="d">
<input type="button" value=" Calculate " onClick="a_times_d(this.form)">
</p>
</FORM>

It is based on a JS calculator I found in the calculators section of <!-- m --><a class="postlink" href="http://javascript.internet.com/">http://javascript.internet.com/</a><!-- m -->
I'm working in Dreamweaver 4.

I'd appreciate any assistance.
Debbie
 
Back
Top