onClick help

OK…i want, when user clicks ok, both results to be writen…i only get one…pls help

<HEAD>

<SCRIPT LANGUAGE=“JavaScript”>

function ro_div_b(form) {
ro=eval(form.ro.value)
b=eval(form.b.value)
c=ro/b
form.ans.value = c
}
function B_div_b(form) {
B=eval(form.B.value)
b=eval(form.b.value)
d=B/b
form.ans2.value = d
}

</SCRIPT>

<BODY>
<CENTER>

<FORM name=“formx”>
<table width=“93” border=“1”>
<tr>
<td width=“30”>ρ=</td>
<td width=“154”><input type=text size=4 value=0 name=“ro”></td>
</tr>
<tr>
<td>B=</td>
<td><input type=text size=4 value=0 name=“B”></td>
</tr>
<tr>
<td>b=</td>
<td><input type=text size=4 value=0 name=“b”></td>
</tr>
<tr>
<td>ρ/b=</td>
<td><input type “number” value=0 name=“ans” size=9></td>
</tr>
<tr>
<td>B/b=</td>
<td><input type “number” value=0 name=“ans2” size=9></td>
</tr>
<tr>
<td colspan=“2”><div align=“center”>
<input type=“button” value=" ok " onClick=“ro_div_b(this.form)” >

&lt;/div&gt;&lt;/td&gt;
&lt;/tr&gt;

</table>
</FORM>

</CENTER>

The fix for the specific problem you are asking about is:

<input type="button" value=" ok " onclick="ro_div_b(this.form);B_div_b(this.form)" >

You should really replace the eval() tags with one of the better ways of converting a string to a number such as Number() or + and also get rid of the language= garbage and replace it with type=“text/javascript”

You should also consider upgrading the HTML you are using to use the more modern HTML 4 that was introduced in 1997.