HTML code:
<form id="hostadd" action="addmoney.php?taskid=12" method="post" onSubmit="return false">
<input type="hidden" name="mode" value="" />
current unit price:$
<input id="unitprice" name="unitprice" type="text" size="5" maxlength="6" value= 0.50 /> 
Shortfall:<input id="shortfall" type="text" name="shortfall" size="4" maxlength="6" value=80 />
<input id="add_price" type="submit" value="Submit" onclick="Adjust()"/></form
Jquery code:
function Adjust(){
$totalprice=parseFloat($('unitprice').val())*parseInt($('shortfall').val());
alert($totalprice);
};
When I test
var unitPrice = $('#unitprice').val();
alert(unitPrice);
var shortFall = $('#shortfall').val();
alert(shortFall);
I got two blank alerts.