Passing more than one parameter

I am trying to pass the appropriate parameters but nothing seems to be working?

function calcSubTotal(unitPriceId, qtyId, subTotalFieldId) {
var unitPrice = parseFloat(document.getElementById(unitPriceId).value);
var qty = parseInt(document.getElementById(qtyId).value);

<tr>
<td><table><tbody>
<tr><th>Item</th><th>Price</th><th>Quantity</th><th>Sub-Total</th></tr>
<tr align=“center”>
<td align=“left”>Hamburger</td><td><input type=“text” id=“itm1” value=“2.99” size=“6” /></td>
<td><input type=“text” name=“qty1” id=“qty1” value=“” size=“6” onChange=“calcSubTotal(‘itm1’, ‘qty1’, ‘st1’)”/></td>
<td><input type=“text” name=“stl” id=“st1” value=“” size=“6” onChange=“SubTotal”/></td></tr>

		&lt;tr align="center"&gt;
		&lt;td align="left"&gt;CheeseBurger&lt;/td&gt;&lt;td&gt;&lt;input type="text" id="itm2" value="$3.99" size="6" /&gt;&lt;/td&gt;
		&lt;td&gt;&lt;input type="text" name="qty2" id="qty2" value="" size="6" onChange="calcSubTotal('itm2', 'qty2', 'st2')" /&gt;&lt;/td&gt;
		&lt;td&gt;&lt;input type="text" name="st2" id="st2" value="" size="6" onchange="SubTotal"/&gt;&lt;/td&gt;&lt;/tr&gt;

		&lt;tr align="center"&gt;
		&lt;td align="left"&gt;Chicken Burger&lt;/td&gt;&lt;td&gt;&lt;input type="text" id="itm3" value="$4.99" size="6" /&gt;&lt;/td&gt;
		&lt;td&gt;&lt;input type="text" name="qty3" id="qty3" value="" size="6" onChange="calcSubTotal('itm3', 'qty3', 'st3')" /&gt;&lt;/td&gt;
		&lt;td&gt;&lt;input type="text" name="st3" id="st3" value="" size="6" onChange="SubTotal"/&gt;&lt;/td&gt;&lt;/tr&gt;

What you posted seems to be free from syntax and logic errors, although you’ve posted only a fragment of your function. The dollar symbol in $3.99 will be a problem when converting from a string to a number though. Take a look a substring() to handle that.

thanks