Whing Dela Cruz
asked on
Multiflying 2 Input Text On a Table
Hi experts,
I have a Table name, "erTable" with four columns, col(0), col(1), col(2), col(3).
In col(0), I put input type="text" and I named it as "qty".
In col(1), this serve as a name of the items ex: (Banana)
In col(2), this serve as price of an item.
In Col(3), I put input type="text" and name it as ptotal.
I need to multiply col(0) by col(2) and put it to col(3). Here's the function of on OnKeyUp;
<script>
function myFunction()
{
ptotal = (qty * pTotal);
}
</script>
Multi2InputTextOnTable.html
I have a Table name, "erTable" with four columns, col(0), col(1), col(2), col(3).
In col(0), I put input type="text" and I named it as "qty".
In col(1), this serve as a name of the items ex: (Banana)
In col(2), this serve as price of an item.
In Col(3), I put input type="text" and name it as ptotal.
I need to multiply col(0) by col(2) and put it to col(3). Here's the function of on OnKeyUp;
<script>
function myFunction()
{
ptotal = (qty * pTotal);
}
</script>
Multi2InputTextOnTable.html
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Hello hielo,
This code is working perfectly as I tried,
row.cells[3].firstChild.va lue = "$" + ( row.cells[0].firstChild.va lue * parseFloat(row.cells[2].in nerHTML.re place(/[^\ d.]/g,"")) ).toFixed(2);
but, what about of summing the row.cells(3)? and put it into (input type:"text" id="GrandSome") Hope you can extend your help. Thanks!
This code is working perfectly as I tried,
row.cells[3].firstChild.va
but, what about of summing the row.cells(3)? and put it into (input type:"text" id="GrandSome") Hope you can extend your help. Thanks!
Check the code that I had send.It has your last request
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Hi hielo, The code you gave is perfectly answered my needs. Thank you for this kind of solutions as I have found that every Experts has a unique and excellent solutions. I have posted almost the same question at the same time and I've learned different solutions from different experts,
ASKER
Thank you for your participation and making my project possible. More power and ability to solve problems, God bless you all Guys!
Open in new window