michelle1404 Posted June 7, 2014 Share Posted June 7, 2014 Hello, I want to calculate the difference between 2 textbox value live. I found this solution for adding http://forums.phpfreaks.com/topic/131592-solved-get-the-sum-of-many-text-box-values/ , but dont know how to convert this for subtracting here is my form echo '<tr><td></td><td style="text-align:center;">TOTAL</td><td style="text-align:center;"><input type="text" readonly="readonly" name="payamount" value='.$total.' style="text-align:center; font-weight:bold; font-size:13px;" ></td></tr>'; echo'<form name="form1" method="post" action="" > <tr><td></td><td style="text-align:center;">Advance</td><td style="text-align:center;"><input type="text" name="advance" ></td></tr> <tr><td></td><td style="text-align:center;">Discount</td><td style="text-align:center;"><input type="text" name="discount" ></td></tr> <tr><td></td><td style="text-align:center;">Total Payable</td><td style="text-align:center;"><input type="text" name="total" id="total"/></td></tr> <tr><td><input type="submit" name="submit" value="PAY NOW" > when i enter the value for advance and discount, it should subtract these values with Total and should get entered in Total Payable text box Link to comment https://forums.phpfreaks.com/topic/289046-auto-calculate-the-difference/ Share on other sites More sharing options...
michelle1404 Posted June 7, 2014 Author Share Posted June 7, 2014 Sorry, This is solved Link to comment https://forums.phpfreaks.com/topic/289046-auto-calculate-the-difference/#findComment-1482156 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.