I am trying to create a form that asks for an annual salary amount and percentage of that amount that should be allocated to a project. My result displays more than two decimal places. How can I round and truncate all but two decimal positions in the result. I have placed the following code in the attribute section of the field being calculated.
onclick="document.getElementById('fed_fnd_req1').value=parseFloat(document.getElementById('ann_sal1').value)*parseFloat(document.getElementById('pct_time1').value/100);"
Thanks for any help.. this is Joomla 2.5.