Hello,
I want to auto calculate two field values to be displayed in another field. The code below works fine on the xxxadd.php page;
<script type="text/javascript"><!--
function updatesum() {
document.finvoiceitemsadd.x_ItemTotal.value = (document.finvoiceitemsadd.x_Quantity.value -0) * (document.finvoiceitemsadd.x_Override.value -0);
}
//--></script>
When I input the values in the fields the total calculates. All is good.
Now I want to use Grid Add in the detail page. The page looks exactly how I want it to look but I cannot get this to work there. I noticed that the field ID's now have a number like x1_Quantity and x2Quantity. How can I dynamically append that number to my code above to replicate across all the row in the Grid Add page? I need to get the Row Number somehow.
Thanks
JW